Hi Telerik's Team,
I need to group data in RadGridView by Type field from my object. This works!!!
But I dont wanna to sort that groups ascending or descending. I need to sort by another field: OrderType.
I am using GroupDescriptor to do this. Like below:
But , this way sort by alphabetical order. The GroupDescriptor doesn't have a property to indicate the field used to sort the groups.
So, I created a new field ( OrderTypeName ) that equals a number concatenated with the Type field.
Example: 1 - FirstGroup, 2 - SecondGroup, 3 - ThirdGroup, 4 - FourthGroup ...
My wish is to mantain that sequence (FirstGroup, SecondGroup, ThirdGroup,..) but without use the numbers (1,2,3,...) ahead from Type field because the numbers can't be displayed in the RadGridView's groups .
In other words, I wanna to group by Type field and sort it by OrderType field.
I need to group data in RadGridView by Type field from my object. This works!!!
But I dont wanna to sort that groups ascending or descending. I need to sort by another field: OrderType.
I am using GroupDescriptor to do this. Like below:
<
telerik:RadGridView
x:Name
=
"radGridView"
>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:GroupDescriptor
Member
=
"Type"
>
</
telerik:GroupDescriptor
>
</
telerik:RadGridView.GroupDescriptors
>
</
telerik:RadGridView
>
...
GroupDescriptor descriptor =
new
GroupDescriptor();
descriptor.Member =
"Type"
;
this
.radGridView.GroupDescriptors.Add(descriptor);
this
.radGridView.SelectedItem =
null
;
this
.radGridView.Rebind();
...
But , this way sort by alphabetical order. The GroupDescriptor doesn't have a property to indicate the field used to sort the groups.
So, I created a new field ( OrderTypeName ) that equals a number concatenated with the Type field.
Example: 1 - FirstGroup, 2 - SecondGroup, 3 - ThirdGroup, 4 - FourthGroup ...
My wish is to mantain that sequence (FirstGroup, SecondGroup, ThirdGroup,..) but without use the numbers (1,2,3,...) ahead from Type field because the numbers can't be displayed in the RadGridView's groups .
In other words, I wanna to group by Type field and sort it by OrderType field.