To reproduce:
- Create a GridViewMaskBoxColumn with standard mask type and mask set to "aaaaaaaaaa".
- Bind the grid to the following DataTable:
private static DataTable GridDataTable()
{
DataRow dr = default(DataRow);
DataTable dt = new DataTable();
dt.Columns.Add("Description");
dr = dt.NewRow();
dr[0] = "1234567890";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = "abc";
dt.Rows.Add(dr);
return dt;
}
- Click the first cell in order to enter in edit mode.
- Click the second cell and you will notice that the text is wrong.
Workaround:
- change the value in the CellEditor intialized event handler:
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
if (e.ActiveEditor is RadMaskedEditBoxEditor)
{
RadMaskedEditBoxEditor editor = e.ActiveEditor as RadMaskedEditBoxEditor;
editor.MaskTextBox.Value = "___________";
editor.MaskTextBox.Value = (string)radGridView1.CurrentCell.Value;
}
}