I have a grid thats starts with 5000 blank rows. When the users start copying many rows of data into the grid from Excel, the grid gets an addrow event per column, per line. Instead of making the user click a “Save” button, our addrow event is designed to insert or update the row into the backend (we use an Ajax call to .net WEBAPI).
In my case, I don’t know if one row is added or 2000. And there are 18 columns.
The problem occurs when there is a large amount of rows like that. Each and every row with it’s columns that was copied generates it’s own addrow event (instead of one call with an array of all the data copied). Therefore, the Ajax async events to update the database start falling behind and so the database may be missing some random rows or a random column data here and there. Debugging through the browser, I can see its because the backend webapi calls get overloaded and some updates don’t go through.
Is there a way to overcome this without resorting to a “Save” button routine. For example, is there a way I can get the one event call with all the data to be copied has been pasted?