This is a migrated thread and some comments may be shown as answers.

Disable columns in Edit Mode

1 Answer 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Varun Bhargava
Top achievements
Rank 1
Varun Bhargava asked on 26 May 2010, 04:21 AM
Hi There,

Is there a way to disable to disable some columns (but still show the values) while the row is in edit mode?

Thanks

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 May 2010, 08:18 AM
Hello Varun,

Check out the following code snippet which shows how to disable the columns in edit mode.

C#:
 
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode) 
        { 
            GridEditFormItem edititem = (GridEditFormItem)e.Item; 
            edititem["columnUniqueName"].Enabled = false
        } 
     } 

Regards,
Shinu.
Tags
Grid
Asked by
Varun Bhargava
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or