jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Callback function while export
Tagged: #jqwidgets-grid, export api callback, grid, javascript grid, jquery grid
This topic contains 5 replies, has 4 voices, and was last updated by admin 4 years, 8 months ago.
-
Author
-
Hi,
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?
Thanks,
AshrithHello Ashrith,
Unfortunately, there is no such option.
Could clarify what you want to achieve?Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
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?
Thanks.
RobHello Rob,
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 theexportdata
method 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).Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHello Hristo,
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.Rob
Hi robf,
The new implementation of the Excel export does not make POST to a server and does not use dataexport.php. It exports to .xlsx client-side and is available since jQWidgets 9+
Best Regards,
PeterjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.