Is there a way we can pass a callback function to the export API? If not, is there any plan to support it in the future?
Unfortunately, there is no such option.
Could clarify what you want to achieve?
I see that this post is three years old and this is exactly what I am looking for.
So, the question is – when a large dataset is to be exported, e.g. 10k records, the export hook is fired off and the UI seemingly hangs until the request is completed on server side. I’ve had users think the app/browser was frozen since it took 7-10 seconds (or more) to complete request – and this is with the export.php program running on same box.
$(grid).jqxGrid('exportdata', type, fileName, exportHeader, rows, exportHidden, serverUrl);
There does not seem to be a way to make an AJAX-like call with a callback to prevent the UI from hanging and also display a progress dialog.
Has anything been done for this callback feature or can you offer a work-around?
There is no such callback, unfortunately.
I would like to ask you for more details.
What kind of format do you want to export?
Because the simple types as the “csv“ and “tsv” types should happen very fast.
This is a lot of data that is exported at once.
As an option, I would like to suggest you try the
exportdatamethod with its 4th argument.
It provides the option to export an array of rows.
I think in that way you could separate all the data on small pieces (from 1000 – 2000 records) and at the same time showing a progressbar.
But this approach has a few negative sides (many files and also, the performance not be better).
Our users typically export data in excel format for further analysis. The work-around poses other problems for our users as it’s not intuitive for them and requires more work on their side to merge files in order to analyze.
You must be logged in to reply to this topic.