Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have taken one grid view grd_Outer and in its template field take another grid view grd_Inner.

On grd_Inner_RowUpdating/RowDeleting/RowCanceling event I need row index of grd_Uoter grid.

Is there any way I can do this?
Posted
Updated 21-Apr-11 2:23am
v2

Its working ..
protected void inner_grid_RowEditing(object sender, GridViewEditEventArgs e)
{
            // Get selected row 
            GridViewRow row = (GridViewRow)(sender as Control).Parent.Parent;
            int index = row.RowIndex;
            // Get Inner grid view
            GridView inner_grid = new GridView();
            inner_grid = outer_grid.Rows[index].FindControl("inner_grid") as GridView;
}
 
Share this answer
 
v2
Comments
ambarishtv 10-May-11 9:25am    
My5
Perhaps this Article will help you to sort out the issues you are having with nested Grid.
Editable Nested DataGrid[^]
Else be precise where are getting problem or what errors you encountered.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900