Home Forums WinForms controls Xceed Grid for WinForms Cell numerical formatting Reply To: Cell numerical formatting

User (Old forums)
Member
Post count: 23064

I tried to use the WinNumericTextBox control, but still no success to format:

WinNumericTextBox w = new WinNumericTextBox(false);
w.BorderStyle = EnhancedBorderStyle.None;
w.DataType = typeof(System.Decimal);
w.Decimals = 1;

c.CellViewerManager = new Xceed.Grid.Viewers.NumericViewer(w);

For example: 1092.75 will be after that I changed the CellViewerManager 1092.75.

If I change the datatype to Int32, then the decimal would disappear – this is correct.
If I change the datatype to Double, then nothing changed.

If I could make the w.Decimals to work, then the problem could be solved!

Imported from legacy forums. Posted by Szabolcs (had 487 views)