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!
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.
Thanks to both of you!