ASP.NET - find bottompagerrow property - Asked By jyoti yadav on 22-Mar-13 01:57 AM

how to find bottompagerrow property of child gridview in textbox changed event. while textbox exists in child grid pager template.

I have found parent grid  bottompagerrow  property on textbox event,
this textbox also exists in parent grid pager template.
like this:-
 protected void txtPagingParent_TextChanged(object sender, EventArgs e)
{
 GridViewRow pagerRow = grdOfficeParent.BottomPagerRow;
}
   

but I am unable to do the same thing in case of child grid, because i cant access child grid directly like parent grid. and I tried it like this:-

 protected void txtPagingChild_TextChanged(object sender, EventArgs e)
    {
     GridViewRow grd = (GridViewRow)txtPagingChild.Parent.Parent; //But it giving null;     
    }
How can I find bottompagerrow property.

Thanx in advance!!
jyoti yadav replied to jyoti yadav on 22-Mar-13 02:28 AM
I havedone it like this:-

  GridView grdUserChild = ((GridView)(sender as TextBox).Parent.Parent.Parent.Parent);

Thanx to oll