Data Export after filters are applied

8 posts, 0 answers
  1. Hattan Shobokshi
    Hattan Shobokshi avatar
    2 posts
    Member since:
    Apr 2010

    Posted 17 Feb 2012 Link to this post

    I have a kendo grid that is attached to a datasource. Users are able to apply filters on the grid and I'm wondering if there is a way to extract the data after the filters are applied?

    The reason for this is that I can then send the filtered data to the server and export to csv/excel. Currently my export works, but doesn't take into account any filters. It exports all the data from the grid.

    Thanks!
  2. Hattan Shobokshi
    Hattan Shobokshi avatar
    2 posts
    Member since:
    Apr 2010

    Posted 17 Feb 2012 Link to this post

    I figured it out. I have to call the view function on the data source. That gives me back a javascript object with the filtered data.

    var data = grid.data("kendoGrid").dataSource.view();

    Thanks!
  3. Kendo UI is VS 2017 Ready
  4. Roberto
    Roberto avatar
    3 posts
    Member since:
    Mar 2012

    Posted 13 Apr 2012 Link to this post

    Hi Hattan,
    i've your same problem.
    Could you help me?
  5. Hattan
    Hattan avatar
    1 posts
    Member since:
    Feb 2012

    Posted 13 Apr 2012 Link to this post

    Hi Roberto,
    Sure, have you tried calling the view function on the grids data source? That should return the data that is currently viewable in the grid.
  6. Jonathan
    Jonathan avatar
    57 posts
    Member since:
    Jun 2012

    Posted 16 Jun 2012 Link to this post

    You care to share your code on how your exporting the data grid to excel/csv? I would love to see how you are doing it.
  7. Vijay
    Vijay avatar
    1 posts
    Member since:
    Jun 2012

    Posted 27 Jun 2012 Link to this post

    I have data in kendo grid and want export that to excell can you help me by code
  8. Sang
    Sang avatar
    25 posts
    Member since:
    Oct 2011

    Posted 12 Jul 2012 Link to this post

    Hi Hattan,
    If you don't mind, can you share your export code?  We're looking to do the same thing.  Thanks.
  9. Hattan Shobokshi
    Hattan Shobokshi avatar
    2 posts
    Member since:
    Apr 2010

    Posted 12 Jul 2012 Link to this post

    No problem. I'm currently extracting the data and sending it to an ASP.NET MVC action method that renders an excel file based on the data. The server side component is based on asp.net and uses a custom library that I built. 

    I'm planning to put together a blog post to explain how I did. As soon as that's done I'll come back here and post an update.

    Sorry for the delay guys, I've been super busy but I hope to have this up shortly.
Back to Top
Kendo UI is VS 2017 Ready