jQuery UI Widgets › Forums › Grid › Contol JqxGrid exportdata round trip to service and back
Tagged: #jqwidgets-grid, Exportdata, grid, javascript grid, jquery grid
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 8 years, 4 months ago.
-
Author
-
Is there a way to prevent exportdata method on jqxGrid to send data to server back.
I am trying to implement exporting data (csv,tsv) on grid I am devloping
Looking at this sample
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/dataexport.htmI did noticed that calling PDF export does not sendign data to server.
It renders PDF locally and give back to user without round trip.Is there a way to prevent POSTING grid to server and for others exports formats.
Way I export data is calling somehting as this
$("#gridEngine").jqxGrid('exportdata', 'CSV', 'RobotReport', true, null, false, '../../Reports/GridExport');My controller (server-side) all is do is to return back file from post
[HttpPost] [DisableRequestSizeLimit] [Route("Reports/GridExport")] public FileContentResult GridExport(string filename,string format,string content) { var contentType = "text/xml"; var bytes = Encoding.UTF8.GetBytes(content); var result = new FileContentResult(bytes, contentType); result.FileDownloadName =filename + "." + format; return result; }This working for small girds very well.
But I have problem when user load +10 of megabytes in grid and try to export that to csv or excel.
In that case I need to send back to server very large post.
That is making a lot of troubles, regarding preferences, traffic etc.It will be nice if we cloud extend exportdata method to render files locally as it does for PDFs
Hello Admir Hodžić,
It is possible to fetch the data in some of the exporting type formats and to use it as you wish.
Please, take a look at this example.Also, I would like to suggest you look at this topic:
https://www.jqwidgets.com/community/topic/export-data-for-sending-email/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.