Is there a way to have a decimal column that does not display the trailing zeros when editing a value?
I tried changing the Editor to an UltraNumericEditor but it keeps including mask characters and a $ that I do not want.
I just simply want the raw decimal number without the trailing zeros.
I see in the past it has been said that it is not possible, without some funky workarounds at which point it would be better to just force the column type to be double. (This will also be a pain for me).
Note that I am using currently Infragistics 2013 Volume 1.
I appreciate any help that is offered.Thank you.
Hi,
Thank you for posting in our forums.
By default the grid won’t show any trailing zeros when editing even if the column is decimal type. I have attached a small sample project. Notice that when you edit the Price column (which is of type Decimal) no trailing zeros are shown. What settings are applied to the decimal column in your application? Have you specified MaskInput or Format for the column?
Please provide me with a sample which reproduces this and I will be glad to research it further. You can use my sample as a starting point.
I am looking forward to hearing from you.
When I tried your sample application, I was easily able to have zeros in the Price Column. If I change a price to a different value with trailing zeros, they show when editing is complete and when editing the value again. For me, all of the data comes from a database (including the decimal qty field), so it appears to come with the zeros embedded.
Changing the first line of the data loading code in Form1_Load in your sample project to the following will demonstrate the issue (it is wrapped to ensure visibility):
ds.Tables["table1"].Rows.Add(new Object[]
{ null, "Beverage", 50, 10.200m, new DateTime(2008, 04, 22) });
Notice the change from "10.2" to "10.200m" which ensures that a decimal number is being pushed into the datatable.
I appreciate you looking into this.Thank you