Completed
Last Updated: 23 Apr 2014 12:56 by Ira
ADMIN
Paul
Created on: 12 Aug 2013 06:52
Category: GridView
Type: Bug Report
2
FIX. RadGridView - GridViewMaskBoxColumn - when moving from one cell to another the two values get mixed up.
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;
   
    }
}
1 comment
Ira
Posted on: 12 Feb 2014 16:52
Absolutely needs to be fixed as soon as possible.