I am using webgrid (not enabled the AJAX).
I want to get all the new added rows....but I do not want to add them to the db one by one..I want to have all of them in one single transaction because I need to perform other operation before the insert....
How can I do it?
Thanks
Yes you will have to store the values if you want to update the database in one step. Store the table or whichever entity that is your data source in a session state variable. Once you decide to update, you have what you already need and just have to persist the changes to the database.
An array needs to be inizialized......How can I do it, if I do not know how many rows have been added/updated?....
yes, but it seems that this event is fired for each row.....So I have to store somewhere the cells values....
I cannot use an Array to store the cells values because I do not know how many rows have been added or updated.......
Do you have any suggestion how to save these values and use later when i need them?
thanks
Hello,
You have the answer in your title. Handle the UpdateRowBatch event. Rows will be batched. An explicit postback is required. The event fires once for every update row.