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

edit in place mode in radgrid

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Webster Velasco
Top achievements
Rank 2
Webster Velasco asked on 17 Dec 2009, 01:03 PM
hi

i wanna ask if its possible to unenable 1 column in radgrid edit mode in place
because its a primary key and i want to show it but un able to modify

thanks  a lot

regards
webster

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Dec 2009, 01:14 PM
Hello,

Have you tried setting the ReadOnly property to True for the column that you don't want to edit?

Also you can try another approach as shown below for disabling particular column.
CS:
 
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
{  
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
    {  
        GridEditableItem editItem = e.Item as GridEditableItem;  
        TextBox txtbox = (TextBox)editItem["PrimaryKeyColumnUniquName"].Controls[0];  
        txtbox.Enabled = false;              
    }  
}  

Thanks,
Princy.
Tags
Grid
Asked by
Webster Velasco
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or