For looping through the inner grid, you can use the below code (when clicking on a button)
gvMainGrid is the parent grid
gvInnerGrid is the child grid
Using the below code you can loop through any controls.
protected void btnUpdate_Click(object sender, EventArgs e)
{
for (int i = 0; i < gvMainGrid.Rows.Count; i++)
{
for (int j = 0; j < ((GridView)gv.Rows[i].FindControl("gvInnerGrid")).Rows.Count; j++)
{
((TextBox)((GridView)gvMainGrid.Rows[i].FindControl("gvInnerGrid")).Rows[j].FindControl("txtSNo")).Text = "100";
}
}
}
Hope this will help you.