This is a migrated thread and some comments may be shown as answers.

ServerPaging and sorting

3 Answers 684 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Amir
Top achievements
Rank 1
Amir asked on 13 Jul 2016, 05:35 AM

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. . 

3 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 14 Jul 2016, 03:54 PM
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.
0
Paul White
Top achievements
Rank 1
answered on 28 Oct 2017, 05:31 AM

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?

0
Stefan
Telerik team
answered on 31 Oct 2017, 01:49 PM
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.
Tags
Grid
Asked by
Amir
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Paul White
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or