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

If I have a grid row in my hands, how do I set the row to edit mode so that the edit template is the one showing???

2 Answers 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Acadia
Top achievements
Rank 1
Iron
Acadia asked on 09 Sep 2008, 08:09 PM
I have the row in the grid, I want to set the mode to edit mode so that the edit template (the textboxes I created in my templated columns) are the ones showing.  I am doing this in the ItemCommand of the grid. 

I've tried .Edit = true and .Edit doesn't seem to have any  visual effect - I still see the uneditable labels. 

Could somebody please explain how this works?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 10 Sep 2008, 09:26 AM
Hi,


Try the code snippet below to set the row in edit   mode:

protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
         if (e.CommandName == "Edit")
        {
            GridDataItem dataItem= (GridDataItem)e.Item;
            dataItem.Edit = true;
            RadGrid1.Rebind();
        }

Thanks,
Shinu

0
Acadia
Top achievements
Rank 1
Iron
answered on 10 Sep 2008, 01:45 PM
Thanks a ton Shinu it was the rebind I wasn't doing!
Tags
Grid
Asked by
Acadia
Top achievements
Rank 1
Iron
Answers by
Shinu
Top achievements
Rank 2
Acadia
Top achievements
Rank 1
Iron
Share this question
or