Custom server side sorting

2 posts, 0 answers
  1. Nadav
    Nadav avatar
    2 posts
    Member since:
    Aug 2016

    Posted 10 Aug Link to this post


    I want to completely control the server side sorting of my grid. Meaning, when I click a column header, I don't want the grid to do anything - I want to catch the sorting event, update some local parameters in my app, and use a fetch function that I have in my app.

    All I want the column header to do is to present the arrow in the relevant direction.

    I don't want to use and serverSorting=true because I seems to have no control over when this function is called.

    I'm building my columns from the data received so I need to separate the data fetch from the grid's initial creation.

    I tired solving this by catching a change event on the dataSource, and if the event.sender.sort() exists with the relevant parameters, it works, other than the fact that first the grid still sorts the data at client side, and only then it fetches my server side data, which causes a delay, bad performance (~1000 records/30 columns), and unnecessary sorting. event.preventDefault() doesn't stop the client side sorting from happening.

    I'm currently using ui-grid (open source angular grid) which allows me to do so - just control the sorting functionality completely. Is that achievable with kendo grid?

  2. Stefan
    Stefan avatar
    199 posts

    Posted 12 Aug Link to this post

    Hello Nadav,

    Thank you for the interest in Kendo UI.

    Using custom sorting for the Kendo UI Grid columns can be achieved by using its property:

    Additionally, when serverSorting is enabled, you will have full control over the sorting. The DataSource will leave the sorting implementation to the remote service. And you can implement the desired logic for sorting in the remote service:

    Let me know if you need additional information on this matter.

    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top