To retrieve data from textbox inside footer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • durga2005
    New Member
    • Nov 2007
    • 49

    To retrieve data from textbox inside footer

    Hi

    I m using webgrid control
    I m trying to add a new record using its footer

    In the footer I placed a button,and one textboxe to insert the new record.
    when I click the add button,the data in textboxe should be inserted in the database.
    But I could not retrieve the value of the textbox in the footer.

    How can I retrieve the data entererd in the textbox inside the footer?

    Can anyone help????
  • mathewgk80
    New Member
    • Sep 2007
    • 103

    #2
    Originally posted by durga2005
    Hi

    I m using webgrid control
    I m trying to add a new record using its footer

    In the footer I placed a button,and one textboxe to insert the new record.
    when I click the add button,the data in textboxe should be inserted in the database.
    But I could not retrieve the value of the textbox in the footer.

    How can I retrieve the data entererd in the textbox inside the footer?

    Can anyone help????

    Hi Durga,

    int rows = gdvPurchase.Row s.Count;
    string txtProductName = ((TextBox)gdvPu rchase.FooterRo w.FindControl(" txtProductName" )).Text;
    string txtNoOfItems = ((TextBox)gdvPu rchase.FooterRo w.FindControl(" txtNoOfItems")) .Text;
    string txtUnitPrice = ((TextBox)gdvPu rchase.FooterRo w.FindControl(" txtUnitPrice")) .Text;


    This is an example of how to retrieve values from textbox in the footer.

    Regards,
    Mathew

    Comment

    • durga2005
      New Member
      • Nov 2007
      • 49

      #3
      hi

      i dont find the 'FooterRow' property

      and i m using webgrid control

      Comment

      Working...