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......
how do i declare the rows in the datagrid?
any help would be much appreciated! Thank you!
0 · ·