jQWidgets Forums

jQuery UI Widgets Forums Grid Contol JqxGrid exportdata round trip to service and back

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 6 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Admir Hodžić
    Participant

    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.htm

    I 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


    Hristo
    Participant

    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 Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.