server side filtering, sorting and pagination for .NEt core

4 posts, 0 answers
  1. yavnika
    yavnika avatar
    7 posts
    Member since:
    Aug 2016

    Posted 15 Sep 2016 Link to this post

    do you have any implementation for server side filtering , sorting and paging of the grid using .Net core?
  2. Stefan
    Admin
    Stefan avatar
    2236 posts

    Posted 19 Sep 2016 Link to this post

    Hello Yavnika,

    This depends on the used technology:

    1) Kendo UI for MVC. I can suggest using the ToDataSourceResult extension method to convert the data to a Kendo.Mvc.UI.DataSourceResult object. This extension method will page, filter, sort, or group your data using the information provided by the DataSourceRequest object. :

    http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/binding/ajax-binding 

    2) For Kendo UI for jQuery (vanilla HTML/JS Kendo UI widgets), we do not support this functionality out of the box.

    I hope this is helpful.

    Regards,
    Stefan
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Chris
    Chris avatar
    33 posts
    Member since:
    Sep 2018

    Posted 4 days ago Link to this post

    Don't rely on Telerik tech. support. 

    I've done server side filtering, sorting and pagination.  essentially you need to add the following to your grid within the datasource component:  .ServerOperation(true).

    then implement an iqueryable extension for your datamodel like so:

    public static class AjaxCustomBindingExtensions
        {
            public static IQueryable<DomainModel> ApplyOrdersPaging(this IQueryable<DomainModel> data, int page, int pageSize)
            {
                if (pageSize > 0 && page > 0)
                {
                    data = data.Skip((page - 1) * pageSize);
                }
     
                data = data.Take(pageSize);
     
                return data;
            }
    .........
    .......

    etc.  Implement for sorting, and whatever else you need.  And that's it.  

     

    It's normally easier to write server side code to accomplish custom filtering, 

     

     

     

  4. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2251 posts

    Posted 2 days and 12 hours ago Link to this post

    Hello,

    The online examples include a demo that illustrates how custom binding can be implemented with the components. The code shown from the snippet is available there:



    Regards,
    Viktor Tachev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top