call the controls of footer in grid view

Posted by Sharu2789 under C# on 7/4/2012 | Points: 10 | Views : 794 | Status : [Member] | Replies : 3
How to call the controls of footer in grid view in c#




Responses

Posted by: Premalatha on: 7/4/2012 [Member] Starter | Points: 25

Up
0
Down
Inside your GridView_RowCommand Event you can access the footer control by GridView1.FooterRow.FindControl method.

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
TextBox txtSomeNewValue = ((TextBox)GridView1.FooterRow.FindControl("txtSomeNewValue"));
string theTextValue = txtSomeNewValue.Text;
}

If u solve your task please replay me

Premalatha
Software Engineer

Sharu2789, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: saficreator-10970 on: 7/4/2012 [Member] Starter | Points: 25

Up
0
Down
we can directly call the controls of footer row in gridview as like below

 string strvalue= ((TextBox)GridView1.FooterRow.FindControl("txtSomeNewValue")).text;


Sharu2789, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 7/4/2012 [Member] Starter | Points: 25

Up
0
Down
set ShowFooter="true"

Sharu2789, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response