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

[Solved] Access row cell from Parent of the Edit form

2 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 21 Sep 2009, 11:10 PM
I'm doing an RadGrid1_UpdateCommand from an edit form template.  While this event is executing I want to be able to access specific cell text from the row just above the edit form.  How can I do this?  Thanks in advance for any help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Sep 2009, 05:44 AM
Hello Stephen,

I suppose you want to access a cell value from the parent row of an editform. If so, you can try out teh code below:
c#:
protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) 
    { 
        GridEditFormItem item = (GridEditFormItem)e.Item; 
        string strtxt = item.ParentItem["ColumnUniqueName"].Text; // access parent row      
          
    } 

Thanks
Princy.
0
Stephen
Top achievements
Rank 1
answered on 22 Sep 2009, 10:54 AM
Works perfect!  Thank you for your quick response and support.
Tags
Grid
Asked by
Stephen
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Stephen
Top achievements
Rank 1
Share this question
or