Home Forums WinForms controls Xceed Grid for WinForms How to programmatically format a column Reply To: How to programmatically format a column

Xceed Support
Member
Post count: 5658

Hi Frederic, 

You could use the GridMaskTextBox to provide amask. You can do something as follows : 

Xceed.Grid.Editors.GridMaskedTextBox maskEditor = new Xceed.Grid.Editors.GridMaskedTextBox();
Xceed.Grid.Editors.GridMaskedTextBox maskViewer = new Xceed.Grid.Editors.GridMaskedTextBox();

gridControl1.Columns[ 0 ].CellEditor = maskEditor;
gridControl1.Columns[ 0 ].CellViewer = maskViewer;

maskEditor.Mask = “###-###-###”;

maskViewer.Mask = “###-###-###”; 

Imported from legacy forums. Posted by Michel [Xceed] (had 233 views)