Hi,
I have the following Problem: I have a Grid with remote Data Binding via Ajax request. When the Parameters for the Request Change and I call the read() Function again I also have to change the total Value, but the Data Request doesn't send the Total. This is done by a second Request that I send with a angular $http request. When I then call The Total Function it doesnt update and has some strange behaviour:
Total Method:
total: () =>
return
$scope.collectionSize
success Callback of getTotal request:
$scope.collectionSize = response.data
console.log
"next log should be: "
+ $scope.collectionSize
console.log
"but is: "
+ $scope.grid.dataSource.total()
and the Console log on initial and second requests:
next log should be: 53
but is: 0
next log should be: 3
but is: 53
If I Call a $apply in the getTotal it says digest already in Progress. The Grid is initialised with the angularjs feature.
On initial load the Grid says ... of 53 Items.
On second Data load it says ...of 53 Items again.
And on the third call it then says ... of 3 Items.
So it is always one load behind, except on the initial load.