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

RadGridView WPF - How to sort by Group?

2 Answers 354 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 15 Aug 2019, 06:48 PM

Saw instructions on how to use tags GroupByExpression, SelectFields, GroupByFields to sort groups by a sequence number.  However, these tags are not available to me to use.

 

So, I would like to use standard RadGridView properties and techniques to create 3 groups that will be sorted by a sequence number...

 

3 Columns: Process, Date, Version

3 Groups ordered top to bottom: Group1, Group2, Group3.

When I click on the column name "Process" for example, currently the groups move up or down.

I want to keep the groups in the same visual order Group1, Group2, Group3 but only sort each column within the group.

Any ideas?

2 Answers, 1 is accepted

Sort by
0
Drago
Telerik team
answered on 16 Aug 2019, 11:41 AM

Hello Keith,

We have tried to reproduce the behavior you described, but we were not able to as usualy groups should not sort when you do a column sorting.

We have used the GroupDescriptors collection to create a sample project based on your scenario and I hope we have captured what you are trying to do correctly.

Can you please test and see if it works?
If you are still having issues feel to modify the example or send us the code you are using so we can test it on our side.

I hope that helps.

Regards,

Drago

Progress Telerik

Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Keith
Top achievements
Rank 1
answered on 19 Aug 2019, 02:01 PM

Good news!

Just looking at your solution:

 

            <telerik:RadGridView.GroupDescriptors>
               <telerik:GroupDescriptor Member="ID"
                             SortDirection="Ascending" />
            </telerik:RadGridView.GroupDescriptors> 

 

At first, the Groups didn't sort alphabetically, then I realized they were sorting by enum value of ID, so I rearranged the order of the Member IDs, then the groups stayed in a fixed position and the rows within the groups sorted when the columns were clicked.

Thanks again for your help!

Tags
GridView
Asked by
Keith
Top achievements
Rank 1
Answers by
Drago
Telerik team
Keith
Top achievements
Rank 1
Share this question
or