I have a grid, approx 500 row in it, using remote data. The grid is declared in MVC helper, rather than JS, but I don't think that matters in for this issue.
I've added a function which updates some of the values within the grid, that works fine:
(I deliberately am not using the dataItem.set() method, because it fires the dataSource.change event repeatedly, which makes the js function bomb out if running on many rows.
So the above function works fine, and updates 500 rows in about half a second, which is acceptable.
The problem comes when I want to save (sync) the changes. It takes an age, close to a minute before it even calls the controller action to update (as specified for update in the grid definition).
It does work and save/update, but it needs to be faster.
Is there a way that doesn't take a minute to hit the controller save/update action? Or is there a better way of doing this?
Thanks.
I've added a function which updates some of the values within the grid, that works fine:
//I have already tried using grid.dataSource.data() instead of view(), but it doesn't help)
var
dataItems = grid.dataSource.view();
for
(i = 0; i < dataItems.length; i++) {
var
dataItem = dataItems[i];
dataItem.Amount = dataItem.OriginalAmount;
dataItem.IsIncluded =
true
;
dataItem.dirty =
true
;
}
grid.dataSource.fetch();
//This shows the dataSource's changed values in the grid
(I deliberately am not using the dataItem.set() method, because it fires the dataSource.change event repeatedly, which makes the js function bomb out if running on many rows.
So the above function works fine, and updates 500 rows in about half a second, which is acceptable.
The problem comes when I want to save (sync) the changes. It takes an age, close to a minute before it even calls the controller action to update (as specified for update in the grid definition).
It does work and save/update, but it needs to be faster.
Is there a way that doesn't take a minute to hit the controller save/update action? Or is there a better way of doing this?
Thanks.