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

Grid controls

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kholisa
Top achievements
Rank 1
Kholisa asked on 07 Jun 2012, 02:34 PM
Hi

I got a radGrid I update on it but now i dont want to update all my fields meaning i want a user to be restricted on accessing some textboxes during update on the grid.My problem is when i make them readonly they overwrite on database as null not keeping thier records. how would i achieve that?

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 07 Jun 2012, 06:52 PM
Hello,

You can also manually hide column in edit mode.
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem item = e.Item as GridEditableItem;
                item["ID"].Controls[0].Visible = false; // ID is column unique name
                item["ID"].Controls[0].Parent.Parent.Visible = false;
            }
 
        }


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Kholisa
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or