Skip to content

How to access values of footer textboxes on Button Click Event(Button is outside the Gridview)...

arun kumar

Asked Nov 19, 2012, 7:07 PM EST2 answers
Share
LinkedInX
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

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I got the Answer for this...........

    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;
    0
  • 0
    Try This one..

    Label lbl = ((Label)GridView1.FooterRow.Cells[1].FindControl("LabelName"));
    0