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

Xceed Support
Member
Post count: 5658

Do this instead:

 

 NumericEditor numericEditor = new NumericEditor();
      numericEditor.SettingControlValue += new CellEditorEventHandler( numericEditor_SettingControlValue );
      gridControl1.Columns[ 0 ].FormatSpecifier = “#.####################”;
      gridControl1.Columns[ 0 ].CellEditorManager = numericEditor;
      
  

    void numericEditor_SettingControlValue( object sender, CellEditorEventArgs e )
    {
      WinNumericTextBox winNumericTextBox = e.Control as WinNumericTextBox;

      winNumericTextBox.TextBoxArea.RawText = String.Format( “{0:#.####################}”, winNumericTextBox.Value );

    }

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