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: () =>
success Callback of getTotal request:
$scope.collectionSize = response.data
"next log should be: "
"but is: "
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.