Hi !
I would like that when I insert in a cell a value like "100,000,000" to be interpred by the grid as the number 100000000(one hundred millions) and when I insert a value like "201.33" the "." to be interpreted as "201 integer and 33 decimals" - by default if i use the "." character it just converts to "20133"
Any ideas ?
Thanks!
Thanks Hristo!
Changing it to "###,###,###,##0.##" solved all my issues!
Hello,
Could you please change column format from "###,###,###,###.##" to "###,###,###,##0.00".
Let me know if you have any further questions.
Thanks Hristo, it was really helpful. I've set the column format to "###,###,###.##" . It does the trick i want, but now i get this -> instead of 0.32 i see only .32
(this happens on a machine that has the culture info set like this : the comma separator is "." and the thousand one is "," )
Thanks
As Brian said this is caused by CurrentCulture of the machine where the application is running. But I have created a sample where next to the grid has a labels which shows what are CurrencyDecimalSeparator and CurrencyGroupSeparator on the machine. In the sample I am changing CurrentCulture to be able to set CurrencyDecimalSeparator and CurrencyGroupSeparator based on your requirements. Also I am setting ultraGrid1.DisplayLayout.Bands[0].Columns[0].Format to "###,###,###,###.00".
I hope this help.
The Format property is not applied when the cell is in edit mode, which is by design. You could probably get the behavior you want using the MaskInput property, although since you are fighting the regional settings, you would have to parse the value yourself since the operating system has an opinion about what character is the decimal separator.
Obviously I don't know the details behind the customer request, but I can't help thinking that it is possible they just don't know how to set the regional settings on their machine, and the simplest solution to their problem is to use a culture that uses the comma as the decimal separator.