Getting generated query from Kendo UI Grid MVC

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    Apr 2013

    Posted 17 May 2013 Link to this post


    Is there a way to get the generated query from the Kendo UI Grid? I would like to get this query that has anything the user selected such as sorting, grouping, filtering, ordering, etc.

    What I'm trying to do is have a business layer do validation first to see if the query can be performed. Then if it passes with the search criteria let the query that was generated by the grid perform the search.

    I'm using Entity framework so it would be nice if there is a way to get the query or linq generated without trying to scrape the DataSourceRequest object.

    Thank you,

  2. Vladimir Iliev
    Vladimir Iliev avatar
    2193 posts

    Posted 21 May 2013 Link to this post

    Hi Daniel,

    I would suggest to use the DataSourceRequest object and get the search / filter / paging from it to perform the custom check. Then if the check passes you can return the data to the client side by passing the request object to the ToDataSourceResult extension method.

    Also please note that we are using custom model binder to be able to bind the data from the request on the server side - you can create another custom model binder to bind the request parameters to custom request object. 

    Kind Regards,
    Vladimir Iliev
    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