Home Forums WinForms controls Xceed Grid for WinForms Trailing zeros Reply To: Trailing zeros

Xceed Support
Member
Post count: 5658

To avoid showing the trailing zeroes in edition mode:

you need to assign a numeric editor to your cells. You create this editor using a WinNumericTextbox in the constructor, which has a displayformatspecifier that can be set. Find below a code snippet on how to implement:

      WinNumericTextBox template = new WinNumericTextBox();
      template.DisplayFormatSpecifier = “#.####################”;
      NumericEditor numericEditor = new NumericEditor( template );
      CellEditorManager cellEditorManager = numericEditor;

      gridControl1.Columns[ “FormatedColumn” ].CellEditorManager = cellEditorManager;



Imported from legacy forums. Posted by Mohamed [Xceed] (had 414 views)