How to access values of footer textboxes on Button Click Event(Button is outside the Gridview)...Footer Text Boxes are generated dynamically in Dynamic GridView...... Footer Text Boxes may be very depending on Column in Table.....
IN 1st DROP DOWN LIST DATABASE NAMES ARE GENERATED DYNAMICALLY
IN 2nd DROPDOWN LIST TABLE NAMES ARE GENERATED DYNAMICALLY DEPENDING ON 1st DROPDOWNLIST
GRIDVIEW IS DISPLAYED BASED ON TABLE NAME
How to access values of footer textboxes on Button Click Event(Button is outside the Gridview)...
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
arun kumar12 pointsPosted Nov 20, 2012, 6:48 PM EST
In button Click I have to write like this
string txtautoid = ((TextBox)(grdview.FooterRow.Cells[1].Controls[0])).Text;
string txtautoname = ((TextBox)(grdview.FooterRow.Cells[2].Controls[0])).Text;
string txtautocity = ((TextBox)(grdview.FooterRow.Cells[3].Controls[0])).Text;
Lavanya SJ2 pointsPosted Apr 3, 2013, 3:59 AM EDT
Label lbl = ((Label)GridView1.FooterRow.Cells[1].FindControl("LabelName"));