User should be able to enter numbers with 4 decimal places. But when they tab out, it should not show the trailing zeros.
That is Mask input is set as "{double:10.4}". If I enter 12.3000 and then tab, it should just show 12.3.
I set the style and maskinput. Is there a way to accomplish this?
Hello Sowmya,
Thank you for contacting Infragistics.
You can apply the following format with pound signs (#) that will supress any numbers (zeros) while the cell is not in edit mode.
For example,
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Format = "0.0###";
Let me know if you have any questions regarding this matter.
Thanks. I tried that. This column to bound to a property in the object which is of type string. So this does not do much. I believe I will have to write extra code to truncate if user enters more and cancel if user enters invalid ones.
Yes, in general, only numeric columns accept formatting. If you have any additional questions please do not hesitate to ask.