you should do it like this
if (e.Item is GridFooterItem)
{
itemtype somenameforitem=(itemtype )grid.FooterRow.FindControl("youritemid");
//for ex if you need textbox then it will be like this
//TextBox texte=(TextBox)gridname.FooterRow.FindControl("textboxid");
}
also you can do it like this.
GridFooterItem footerItem = (GridFooterItem)grid.MasterTableView.GetItems(GridItemType.Footer)[0];
TextBox texte=(TextBox)footerItem.FindControl("textboxid");//accessing Button inside FooterTemplate
I have give the index [0] while getting the grid footer item as the text box is one and only item in my grid footer, if you have multiple footer items, you can give the index of the item you wan to find