Last Updated: February 25, 2016
·
398
· gangrenagastrit

Disable control while EditForm is active

Use CellEditorInitialize method.

protected void GridView_CellEditorInitialize (object sender, ASPxGridViewEditorEventArgs e)
{
    if (!GridView.IsNewRowEditing)
    {
        if (e.Column.FieldName == FIELD_NAME)
        {
             e.Editor.ReadOnly = false;
            e.Editor.ClientEnabled = false;
         }
         else
        {
            e.Editor.ReadOnly = true;
            e.Editor.ClientEnabled = true;
        }
      }
}