This is a migrated thread and some comments may be shown as answers.
Kendo UI Grid issue: 'k-sort' class added to the wrong column
1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
Jan Herman
Top achievements
Rank 1
Jan Herman asked on 16 Aug 2017, 07:04 AM

We are running into a (I think) simple issue with Kendo UI Grid.

Situation is best explained using an image (see attached).

My grid has 4 columns: ID, External Code, Manufacturer,Type.
When I sort, everything works fine, no issues.

When we hide the "External Code"-column (the second column) the table reloads and all is well. 

Now, when we sort on the NEW second column (Manufacturer) the following happens:
1. [Correct] The grid is sorted properly
2. [Correct] The Manufacturer table header gets the 'k-sorted' class, making it blue, showing an arrow 
3. [Issue] The k-sorted class is added to the wrong <col> in the table body <colgroup> definition.

In this case it's adding k-sorted to the third column - which is the original position of the manufacturer column.

Is this a bug in kendo, or are we doing it wrong™?

Additional info

- We're using the latest kendo javascript library.
- We're hiding/showing columns using the $("#grid").data("kendoGrid").hideColumn("internalColumnName") API

 

Please advise,

1 Answer, 1 is accepted

Sort by
0
Jan Herman
Top achievements
Rank 1
answered on 16 Aug 2017, 12:12 PM

After contact with support we found this was an actual bug.

Follow https://github.com/telerik/kendo-theme-default/issues/676 for updates on the bugfix.

This topic can be closed.

Tags
Grid
Asked by
Jan Herman
Top achievements
Rank 1
Answers by
Jan Herman
Top achievements
Rank 1
Share this question
or