Change saveAsExcel() request before sending

5 posts, 0 answers
  1. Aleks
    Aleks avatar
    33 posts
    Member since:
    Nov 2018

    Posted 24 Apr 2020 Link to this post

    Because the grid date filter is still broken (https://github.com/telerik/kendo-ui-core/issues/1864) I have to modify the filter date/time values before the request is made to the server.

    I can do this for normal grid filtering by modifying the filter values in the transport parameterMap, however, when I invoke saveAsExcel() the parameterMap is not called and the wrong date/time values are sent to the server.

    How can I modify the filter values *before* saveAsExcel() makes the request to the server (just as I do for normal filtering)?

     

  2. Aleks
    Aleks avatar
    33 posts
    Member since:
    Nov 2018

    Posted 24 Apr 2020 Link to this post

    I can see why parameterMap is not called. You pass a DataSource into the ExcelExporter constructor, but then create a new DataSource (without copying the transport options across) and use that to fetch the data.
  3. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2187 posts

    Posted 29 Apr 2020 Link to this post

    Hello,

    Data (for example filter values) can be passed to the server with an AJAX request. This can be done by preventing the excelExport event and sending an AJAX request from the handler with both the Grid data and additional data included as a parameter/-s. The Saving Files on the Server article shows an example.

    Regards,
    Ivan Danchev
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  4. Aleks
    Aleks avatar
    33 posts
    Member since:
    Nov 2018

    Posted 15 May 2020 in reply to Ivan Danchev Link to this post

    Thanks, but that's kind of beside the point...

    I shouldn't have to override the Excel export and code a whole bunch of stuff outside the grid, it defeats the purpose of having the Excel export there.

     

    The whole point of the parameter map is to do just this, and it doesn't work when the Excel export binds the data source.

    After all, the whole reason I have to do this is because date time pickers in filters are broken (per my first message).

     

  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2187 posts

    Posted 19 May 2020 Link to this post

    Hello Aleks,

    I've raised the priority of the Github issue, so that we can plan it with precedence over issues with lower priority.

    As for the Excel export, consider logging your idea for improving the export functionality in our Feedback Portal: https://feedback.telerik.com/kendo-jquery-ui

    Regards,
    Ivan Danchev
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top