This question is locked. New answers and comments are not allowed.
I have my RadGridView grouping by using a GroupDescriptor, like this:
I want to do two things:
Have the group header display a default value such as "<Missing>" or "<Unassigned>" for any objects in my grid that have their Category being null. Is there a well defined way to do this? The way I have it now is to add another property to my object called CategoryName and have it return "<Unassigned>" in the case that Category is null. Then group on that property instead.
I also want to push the "<Unassigned>" group to the bottom of the grid. The grid is placing this group first, I suppose because the sorting algorithm being used is considering '<' comes before 'a'. I really don't want to do anything hacky like make this category's name start with a 'z' or something like that. Is there anyway I can control the ordering of the groups in the grid?
And btw, what does the GroupDescriptor.DisplayContent property do? As far as I can tell, it doesn't do anything.
Thanks.
<gridView:RadGridView x:Name="_businessRequirementsByCategory" ItemsSource="{Binding BusinessRequirements}" Style="{StaticResource _gridStyle}"> <gridView:RadGridView.Columns> <gridView:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" /> <gridView:GridViewDataColumn Header="Description" DataMemberBinding="{Binding Description}" /> </gridView:RadGridView.Columns> <gridView:RadGridView.GroupDescriptors> <telerikData:GroupDescriptor DisplayContent="Category" Member="Category" SortDirection="Ascending" /> </gridView:RadGridView.GroupDescriptors></gridView:RadGridView>I want to do two things:
Have the group header display a default value such as "<Missing>" or "<Unassigned>" for any objects in my grid that have their Category being null. Is there a well defined way to do this? The way I have it now is to add another property to my object called CategoryName and have it return "<Unassigned>" in the case that Category is null. Then group on that property instead.
I also want to push the "<Unassigned>" group to the bottom of the grid. The grid is placing this group first, I suppose because the sorting algorithm being used is considering '<' comes before 'a'. I really don't want to do anything hacky like make this category's name start with a 'z' or something like that. Is there anyway I can control the ordering of the groups in the grid?
And btw, what does the GroupDescriptor.DisplayContent property do? As far as I can tell, it doesn't do anything.
Thanks.