Datagrid with negative amounts in edit mode - bug

0
I have an entity with a decimal value. I display this amount in a datagrid which is eitable. I also have a “new” button that created a new value inline. When i click in a newly created textbox for this value, i try to type a negative value, but nothing happens when I type the minus “-” sign. I have to enter a number fiorst, then click back to the beginning of the box and THEN it lets me type a minus sign.   Is this a bug or by design?   EDIT: I did a little more tinkering. When happens is when there is a default value of 0 and you click or tab into the field, it auto-highlights the entire “0” value and you can then type numbers, but can’t type a negative sign.. you have to click the delete button first on the keyboard if you want to enter a minus sign first. It seems odd, but I’m just wonderinf if there is a way to fix this
asked
1 answers
0

hii Brian Lorraine,

actually when data grid let you put (–) minus sign it doesn’t save it as a value after it i refresh the page and it disappeared from grid and grid get blank automatically so it may be design issue.

and second thing that you describe when you edit on the column that have decimal value it get highlight / select automatically and let you type the digit only not let you type minus (-) sign ,

so our digits starts with 0 to 9 so mendix take it you are going to type –0 value, and – 0 or +0 are both only 0 so it not let you type the – sign but after you delete previous default value it will let you type the – 1 or -9 any value and also will save , but if you type -0 it will also visible as save but as you refresh your page -0 will become only 0 it means mendix already know – 0 or 0 both are same. but -1 or 1 are not same so it let it save.    

 

additional :-  

here is a case that is some one can type -negetive value is not covered because mendix team assume decimal value most of the time used to save a real positive number like price , age.

 

 DECIMAL data type is used to store exact numeric values in the database. We often use the DECIMAL data type for columns that preserve exact precision e.g., money data in accounting systems.

 

and in real world data base value with negetive sign does not save in database for example if a company refund some money to someone it saves to different column of database  not we save it as – value (-9000) or etc so minus sign in starting of the value rarely will used.

 

i hope it will help you.

answered