Reorder and then sort

4 posts, 0 answers
  1. Mark
    Mark avatar
    4 posts
    Member since:
    Sep 2015

    Posted 04 May 2016 Link to this post

    We have Kendo UI version 2015.3.930.  We have a page with a single grid which uses server-side filter, paging, and sorting via odata, and noticed that if you reorder a column manually through the browser, and then manually try to sort the moved column, it will take on the values of the other column.  Is this a known bug or is there something I need to do to avoid this problem?
  2. Patrick
    Admin
    Patrick avatar
    230 posts

    Posted 05 May 2016 Link to this post

    Hi Mark,

    Please take a look at the following Telerik Dojo which illustrates a Kendo Grid using odata and reorderability.  I was unable to replicate your scenario.  Please update the dojo or create a new dojo which shows the behavior of your Kendo Grid.  

    I would also recommend updating to the latest version of Kendo to remain up-to-date.

    I look forward to your sample.

    Regards,
    Patrick
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Mark
    Mark avatar
    4 posts
    Member since:
    Sep 2015

    Posted 05 May 2016 in reply to Patrick Link to this post

    We are using a row template with angular elements.  Part of the reason this is nice is that we can keep the markup out of the controller.  I created the following dojo to reproduce the problem.  Is it true that row templates and reordering cannot be used at the same time?  

    If so, is the only alternative to use column templates as I have done on line 87 (commented out for now)?  Or is there still a way to use the row templates, or something else?

  4. Patrick
    Admin
    Patrick avatar
    230 posts

    Posted 06 May 2016 Link to this post

    Hi Mark,

    You are correct that the row templates cannot use column reordering because the Grid doesn't know how to reorder the custom contents in the row template.  And yes, I recommend using column templates like you did in line 87.  

    As for the formatting of used for OrderDate, you can use columns.format.  Here is an updated version of your Telerik Dojo using columns.format.  

    Here is the code used:
    {
         field: "OrderDate",
         title: "Order Date",
         format: "{0:MM/dd/yyyy}"
    },

    Hope this helps!

    Regards,
    Patrick
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top