Is it possible to sort/filter data only within a specified group?
For example, there are 3 groups, the first one is sorted by the first column, the second group is sorted by the second column and etc.
Thank you for the answer.I've looked into the article, and I'm not sure that I understand how to achieve the requirement, following the article's contents.Can you pinpoint me in the right direction? The issue is that I have to implement the possibility to change the group's sorting settings in run-time.
For example, I have a data model - Car, with properties: model (string), speed (double), price (decimal), and type (enum - normal, sport). I've grouped the grid by the type. As a result, the grid has two groups: normal and sports cars. In run-time, I want to sort the normal cars' group by ascending price, and then the sports cars' group by descending speed, while having the ability to change the sorting settings of each group in real-time.
As I see it, the groups have to have their own sort descriptors, that could be modified.
Some signs of the needed functionality I saw in generic group descriptors (grouping expression), but it seems the sorting there is for the groups' order in the grid, not the items in a particular group.
Hello Oleh,Thank you for the clarification.
My suggestion at this point would be to handle the Sorting event and manually update the ItemsSource of the RadGridView control based on the conditions.
To demonstrate what I have in mind, I've prepared a small sample project to demonstrate what I have in mind. If you sort by any of the columns, you will notice that the items in the groups are sorted by the following criteria - for the GK and DF positions the players are sorted by their Number and in the MF and FW positions, the items are sorted by their Country property.
You can use a similar approach to sort the groups in your original application. I hope you find the attached sample project helpful in the process.