New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$scope.gridAPI.grid.rows not updating to match contents of $scope.gridOptions.data #5925
Comments
To clarify, this issue is not impacted by the visibility or invisibility of the grid. I tested again on a visible grid, first loading just 100 rows of data, then attempting to batch-execute a load-and-export of 1000 rows. First execute:
Then execute:
So in either case, $scope.gridApi is always one step behind after loading new data into $scope.gridOptions.data |
Seems a convoluted way to create a csv - check the code but the actual csv generation is handled by a library that you could just use directly to make a csv. That'd be much less error prone.
…Sent from my iPhone
On 6 Jan 2017, at 10:08 am, JMax2012 <notifications@github.com<mailto:notifications@github.com>> wrote:
To clarify, this issue is not impacted by the visibility or invisibility of the grid. I tested again on a visible grid, first loading just 100 rows of data, then attempting to batch-execute a load-and-export of 1000 rows.
First execute:
myService.GetPartialData(1,100).then(function (response) {
if (response) {
$scope.gridOptions.data = response;
//debugger shows $scope.gridOptions.data = Array[100], correct amount of data
}
});
Then execute:
myService.GetAllData().then(function (response) {
if (response) {
$scope.gridOptions.data = response;
//debugger shows $scope.gridOptions.data = Array[1000], correct amount of data
$scope.gridApi.exporter.csvExport('all', 'visible', myElement);
//debugger shows $scope.gridApi.grid.rows = Array[100]
//csv contains 100 rows of data
}
});
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#5925 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AFAXFQDuYEhn8kqYbt6RoOwyKZirw_7Aks5rPVvfgaJpZM4LcEsp>.
|
Hello, I have the same problem when using "exporterAllDataFn". When the promise resolves in the funcion "loadAllDataIfNeeded", the "grid.options.data" is a zero items array. So, "grid.modifyRows(grid.options.data)" is empty and the csv too Any idea why? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions. |
I have a hidden grid ("gridExport") whose purpose is only to consume large data sets and export the data to CSV.
When the user clicks the Export button, this code is executed -- I have indicated in the comments what the issue is:
Is there a way to force the grid api to "catch up" and refresh so that it is aware of the latest data set?
The text was updated successfully, but these errors were encountered: