I have grid binding to Data Table with many numeric columns. Is there a setting at the Grid level to say "all numerics should have two decimal places"?
Thanks!
Thanks to both of you!
To add to what Alex mentioned, the Format property needs to be set on each individual column. There's no one location where you can set this format to apply as a "default."
Hi, vrn
UltraGrid's column has Format Property that you can use to set format for numerics.
You can do this as follows:
foreach (UltraGridBand gridBand in grid.DisplayLayout.Bands) { foreach (UltraGridColumn column in gridBand.Columns) { if (column.DataType == typeof(double) || column.DataType == typeof(decimal)) { column.Format = "n2"; } } }
Thanks, Alex.