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

[Solved] Get source row of edited row

1 Answer 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mohamed
Top achievements
Rank 1
Mohamed asked on 14 May 2008, 05:01 PM
Hi,

I need to get the source row (a business object) of the gird row when I click on the Edit button.

I tired handling the gvSubscription_EditCommand event but the (e) parameter's e.Item.DataItem property was NULL.

Is there another way to get the object being edited in the grid when the EDIT button is clicked?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 May 2008, 06:03 AM
Hi Mohamed,

Try accessing the Item in edit mode as shown below.

CS:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
     {  
         if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode))  
         {  
             GridEditableItem Edititem = (GridEditableItem)e.Item;  
             //...  
 
         }  
          
    } 


Thanks
Princy.
Tags
Grid
Asked by
Mohamed
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or