hi
i have a gridview called Gridview1 that include an either Gridview inside . child gridview called Grid1
now i want access to child gridivew in c#
i write this code:
GridView MyGrid = (GridView)GridView1.TemplateControl.FindControl("Grid1");
|
but i confronted this error:
Object reference not set to an instance of an object.
|
in this code i get that error too:
GridView MyGrid = (GridView)GridView1.FindControl("Grid1");
|
how can i do that?