Set Column to readonly when in edit mode
I am using 'GridTemplateColumns' on my radgrid and I have trouble setting one of my columns to 'readonly' ONLY when its in 'edit mode'. Does anyone have any suggestions in how to do this programmatically...?
Hi Aret,
Try the following approach:
protected
void
RadGrid1_ItemCreated(
object
sender, GridItemEventArgs e)
if
(e.Item.IsInEditMode && !(e.Item
is
IGridInsertItem))
(e.Item
as
GridEditableItem)[
"ColumnName"
].Enabled =
false
;