Hello.
I'm having a problem with the order of columns in the grouping bar. I have a grid with one group. Now I drag another column to the grouping bar and the column immediately gets droped in front of the existing column instead of behind it. How can I fix this?
Best regards,
Kalli
5 Answers, 1 is accepted
Hello Kalli Kaldi,
The first group that is added to the Kendo UI Grid is the most outer group. Each subsequent added group is nested to the previous one. For example if we take a look at the Grid / Basic usage demo:
1. If we group by "Contact Title" then the records will be grouped for each job title.
2. Then if we decide additionally to group by "Country" it will group by country each job title group (nesting).
This is why the next group is appended to the drop zone.
Regards,Boyan Dimitrov
Telerik
Hello Boyan.
I realize this is the expected method. However, my dilemma is that when I add the second group it gets added in front of the first group, so now my list is grouped by group2 and then group1. It should be the other way around.
How can I fix this?
Best regards,
Kalli
The order of the columns, by which the grouping is performed, is determined by where you drop the columns after the first one. You can drop the second column either to the left, or to the right of the first one. The Grid will be grouped by the leftmost column first, then the second, etc.
The columns can be also reordered by dragging, as demonstrated in the following video:
http://screencast.com/t/3tMJjOqUHip
I hope this helps.
Regards,
Dimiter Topalov
Telerik
Hi Dimiter
I guess I wasn't clear enough in the beginning, so here it goes.
It doesn't matter where I drop the second column, it always gets added to the left of the first column. Here's a video :
https://gyazo.com/ab3e0cc75d7e88db5878cc3bf02734b6
As you can hopefully see, the group Flokkur is first added, then I add the second column, Kennitala, and drop it to the right of the first column but it still gets added to the left of the column Flokkur.
Best regards,
Kalli
Thank you for the clarifying video. I understand what the issue is, but is not a known one, and cannot be reproduced on our side.
Can you please send us either a runnable project, demonstrating the undesired behavior, so we can inspect what might be causing it.
Thank you in advance.
Regards,
Dimiter Topalov
Telerik