Inserting data to a table from gridview .
Posted on 2008-06-16
I have a grid with 7 columns. The third column is the unique /primary key but I hide it in the gridview1_rowcreated event.
First column is a an ItempTemplate with a checkbox. By placing a check in this checkbox indicates that this row has to be process. The second column (purchaseticket)is a checkbox where user will mark or not. By checking this column , it means that a purchaseticket is bought.
Column 3 to 5 are all bound columns/ fields to the 'Registration table. Column 6 and 7 are dropdownlist.
Whatever is selected in these 2 dropdownlist , the text has to be written to the registration table.
My question is how would I loop to the grid and check for the rows and INSERT it a tblProcess.
If column cells 1 is check,that means that the row has to be written to teh database. But it has to check also if columnticket(purchasingticket column)is also slected. If it is , write this to the table ,otherwise not.