Submit information from textbox within GridView

Answered Submit information from textbox within GridView

  • Friday, February 10, 2012 9:10 PM
     
     

    I have a basic order form where my GridView is populated from a SQL query to get a list or products.  The only columns I have in my GridView are a BoundField for ProductName, and a TemplateField with a textbox for Quantity.

    The binding of the datagrid happens on PageInit.

    My problem is that if I fill out the form, and put in a quantity of a product within the GridView, when I submit the web form, I can't grab the ProductName and that specific quanity associated with it.

    For example... (my DataGrid will look like this on the webpage)

    Product Name                                Quantity
    Mouse                                              3
    Keyboard
    Monitor                                            1
    Mousepad

    On submit, I need to iterate through the DataGrid, grab the Product Name and the Quantity associated with it, and ONLY the products that have a quantity, if the quantity is blank, I don't want that information.


    Ryan Elliott Web Application Developer/SharePoint Admin

All Replies