Help recreating transport URLs

2 posts, 0 answers
  1. Brian Vallelunga
    Brian Vallelunga avatar
    101 posts
    Member since:
    May 2008

    Posted 22 Aug 2012 Link to this post

    I have a grid with a data source that posts JSON to my server and returns JSON to populate the grid. What I need to do is add the capability to download the data as an Excel file. The creation of the Excel file is easy enough, but what I need help with is forming a proper URL, using a datasource's existing filtering and sorting options as query parameters. The reason for this is that file downloads via ajax posting are not allowed.

    Obviously the framework does this internally when setting a data source transport's type to GET. Is there a way I can access the transport's read URL? My export URL will be identical, with a minor change I can make manually. If there is no way to get the full URL, is there a way to have the data source's filter and sort values be URL encoded by the framework?

    If these aren't possible, might I suggest adding an "export" transport option to the data source object that we could configure for just this scenario?

  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 27 Aug 2012 Link to this post

    Hello Brian,

    I can suggest you to use the work-around used in this export to Excel code library which is related to the KendoWrappers for MVC. However the client side function which generated the URL in the toolbar link will do the work for you.

    I hope this helps!

    Kind regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top