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

Sort order of groupings

2 Answers 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Guy Inwhitenorth
Top achievements
Rank 1
Guy Inwhitenorth asked on 08 Apr 2010, 07:03 PM
Hello,

I have a grouping in my grid which is specified in xaml. The grouping has two possible values, "Live" and "Paper".

I'd like to ensure that the "Live" grouping is always on top, regardless of how the user sorts data in the grid. (They cannot sort by the column I am using to group by).

How can this be accomplished?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 09 Apr 2010, 02:46 PM
Hello Guy Inwhitenorth,

As I understand,  your idea is to have a field with two values - "live" and "paper" and to group according to them with the condition that those objects with value "live" are always on top despite any sorting.
So, if I understand correctly, this can be accomplished with a GroupDescriptor defined in the RadGridView. It will group the Grid according to the value of the field "type", which is the one accepting "live" and "paper" values.
The definition of the GroupDescriptor is the following:
      <telerik:RadGridView.GroupDescriptors>
         <telerikData:GroupDescriptor Member="Type"
        SortDirection="Ascending"  />
      </telerik:RadGridView.GroupDescriptors>

I hope this helps, but if it does not match your case, please explain your idea with more details.
Best wishes,
Maya
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Guy Inwhitenorth
Top achievements
Rank 1
answered on 09 Apr 2010, 03:17 PM
Ah excellent, that works perfectly, thanks.
Tags
GridView
Asked by
Guy Inwhitenorth
Top achievements
Rank 1
Answers by
Maya
Telerik team
Guy Inwhitenorth
Top achievements
Rank 1
Share this question
or