Home Forums WinForms controls Xceed Grid for WinForms format data using mask characters with bound data Reply To: format data using mask characters with bound data

User (Old forums)
Member
Post count: 23064

The problem is that the TextEditor assigns the Cell.Value property to the “RawText” property of the WinTextBox’s TextBoxArea, which expects to receive the text with no literals (no dot).

What you could do is assign a WinTextBox to the CellEditorManager, and set the “PropertyName” to the Text property instead of the RawText property.

e.g.:

WinTextBox winTextBox = new WinTextBox();

winTextBox.TextBoxArea.Mask = “>#####.@@”;

gridControl1.Columns[ “MaskedText” ].CellEditorManager = new CellEditorManager( winTextBox, “Text”, true, true );

 

Imported from legacy forums. Posted by André (had 552 views)