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

Reorder and then sort

3 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 04 May 2016, 10:04 PM
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?

3 Answers, 1 is accepted

Sort by
0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 05 May 2016, 03:21 PM
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!
 
0
Mark
Top achievements
Rank 1
answered on 05 May 2016, 09:42 PM

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?

0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 06 May 2016, 03:27 PM
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!
 
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
Mark
Top achievements
Rank 1
Share this question
or