Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
how to edit gridview in gridview row in c#??
Posted
Comments
Naman Kumar Sinha 7-Jan-14 7:27am    
What do you want to edit? Be specific.
Karthik_Mahalingam 7-Jan-14 7:46am    
not clear.
Please provide more info.
Member 10276220 7-Jan-14 8:40am    
i wanna edit gridview row inside the gridview..
Naz_Firdouse 7-Jan-14 8:49am    
Use RowEditing event of Grdiview as Tadit Dash mentioned below...

 
Share this answer
 
U want to edit on any button click (which is in main grid view) then here you have answer ,

C#
 protected void btnAddGrid_Click(object sender, EventArgs e)
        {
            Button btnAddGrid= (Button)sender;

            GridViewRow grdMainRow = (GridViewRow)btnAddGrid.NamingContainer; // so u ll find main grid view row , from that find second grid view

            GridView grdSecond = (GridView)grdMainRow .FindControl("grdSecond ");
// now you can edit any row from grdSecond
}


If your answer is not this , then let me.
 
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