Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


looping through rows in datagrid to save to database

mareemaree Member Posts: 35
The function of my form is to generate an order. i am doing this by populating several rows of a datagrid. I have little experience with datagrids and i wish to save the contents of the datagrid, having gone through several validations (eg ensure every cell has been filled out, is there enough quantity in stock etc). i am wondering how to loop through each row of the datagrid, first to validate and then to save each row to the database? is it something like:

for row 1 to ? ( i am unsure of what to put here as the number of rows that will be in the order cannot be predetermined)
perform validation and saving......
next row

how do i declare the rows in the datagrid?
any help would be much appreciated! Thank you!
Sign In or Register to comment.