locked
Loop through a gridview to get data and then send data to tables in a database. RRS feed

  • Question

  • I have a hidden grid that holds the detail for the records in use.  Either one or two records.  It is totaled and the totals are displayed.  When the user makes selection(s) and hits a submit button, I need to pull the information in the datagrid and insert it into tables in a SQL Server database.  I am using vb to do this.  It is being used with an asp.net 3.5 applicaton.   I know I have to loop through the grid but haven't been able to figure out how to do this loop any further than this. 

    For Each gvr as GridViewRow in gvMyGrid.Rows
       Dim drv as DataRowView

    Next

    I have researched this most of the morning and am just getting more confused.  Am I heading in the right direction and can anyone give me some more direction on this?

    Thanks in advance. 
    • Moved by Reed KimbleMVP Friday, February 6, 2009 6:27 AM ASP Question in VB General (Moved from Visual Basic General to Off-Topic Posts (Do Not Post Here))
    Thursday, February 5, 2009 9:11 PM

Answers

  • Closing question.
    • Marked as answer by McGurk Thursday, May 20, 2010 10:04 PM
    Thursday, May 20, 2010 10:04 PM

All replies

  • For Web Application questions (ASP.Net) please visit the offical ASP forums at:
    http://forums.asp.net

    There are major differneces in the DataGrid objects of Windows Forms and Web Forms, so you'll need to be in the ASP community to get help with those controls.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"
    Friday, February 6, 2009 6:26 AM
  • Closing question.
    • Marked as answer by McGurk Thursday, May 20, 2010 10:04 PM
    Thursday, May 20, 2010 10:04 PM