ServerPaging and sorting

4 posts, 0 answers
  1. Amir
    Amir avatar
    7 posts
    Member since:
    Apr 2009

    Posted 13 Jul 2016 Link to this post

    Hi, 

     

    I have seen some example of the Grid ui for serer paging and sorting. It did show the property for server paging and sorting but didn't give much detail how it is going to use on the data source. 

    For example if i have 1000 recrods and I only want to show 20 on each page. I dont want to bring the whole lot and want to do the cutom paging.  So I will se tthe custom paging on by saying Serverpaging=true.  

    Now when I clik on the next page , what message will go to my stored procedure so it returns the next 20.  I saw an articla in telerik that your datasoure should be able to handle skip and top.  Well but from where I am getting the skip and top?  

    I seen many examples but none showing what is sent to the data source from the code. 

    i am going to use the webapi to bind as a datasoruce and use the stored procedure or EF to access the data.

     

    Can you show m some examples please so i can be certain how to pass sort, top, skip from the code.   I know how to make change on the webapi to accomodat any parameter and all the way to database. . 

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    1169 posts

    Posted 14 Jul 2016 Link to this post

    Hi Amir,

    You can check out the following article from our documentation that explains how to implement server-side data operations, and provides both server, and client-side configuration examples:

    http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/web-api-server-operations

    I hope this helps.

    Regards,
    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
  3. Tommy
    Tommy avatar
    6 posts
    Member since:
    May 2017

    Posted 28 Oct 2017 in reply to Amir Link to this post

    Hi Amir,

    I'm also trying to put together a stored procedure as a source for our grid. Did you manage to figure out how to pass it the right parameters to do sorting and filters and just return the correct records for the current page of the grid?

  4. Stefan
    Admin
    Stefan avatar
    2473 posts

    Posted 31 Oct 2017 Link to this post

    Hello, Tommy,

    In general, the Kendo UI Grid will send the sorting and filtering parameters to the server in the following format:

    https://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-serverFiltering

    https://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-serverSorting

    Then on the server, these parameters have to be used to retrieve the desired data from the database.

    Please have in mind that Amir is inactive from nearly a year, so he may not be able to respond.

    More details for the Store procedures can be found here:

    https://stackoverflow.com/questions/29741395/how-to-perform-sorting-and-filtering-in-stored-procedure-with-performance-optimi

    https://stackoverflow.com/questions/9692583/paging-sorting-and-filtering-in-a-stored-procedure-sql-server

    https://www.sqlservercentral.com/Forums/Topic1678375-391-1.aspx

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top