GridView MyGrid = (GridView)GridView1.TemplateControl.FindControl("Grid1");
Object reference not set to an instance of an object.
GridView MyGrid = (GridView)GridView1.FindControl("Grid1");