If you added the nestedGridView into gvMaster dynamically.
You access the it like this:
GridView gv = ((GridView)gvMaster.Rows[0].Cells[0].Controls[0]);
If you added the in ASP.NET page with tags in ItemTemplate, you access it like this:
GridView gv = ((GridView)gvMaster.Rows[0].Cells[0].FindControl("nestedGridView"));