Hello,
I have a question regarding sorting of a GridViewDataColumn.
Here is the column definition:
<telerik:GridViewDataColumn IsReadOnly="True" |
Header="ELEMENT" |
DataMemberBinding="{Binding Name}" |
SortMemberPath="ElementType" |
Width="*"> |
<telerik:GridViewDataColumn.CellTemplate> |
<DataTemplate> |
<StackPanel Orientation="Horizontal"> |
<Image Source="{Binding ElementType, Converter={StaticResource ElementImageConverter}}" /> |
<TextBlock Text="{Binding Name}" |
Margin="3,0,0,0" |
VerticalAlignment="Center" /> |
</StackPanel> |
</DataTemplate> |
</telerik:GridViewDataColumn.CellTemplate> |
</telerik:GridViewDataColumn> |
The ElementType is Enum and the Name is String.
I have two questions:
1) I want the main criteria for sorting the column to be the ElementType, not the name. If I put the ElementType in the DataMemberBinding, then it works, but when I change the Names of the elements outside of the grid, they don't get refreshed (the PropertyChanged event is not handled). When I set the DataMemeberBinding to Name, the refresh is OK. How can I fix that ?
2) I want to make a second criteria for the sort, so that when I sort the elements of one type, are also sorted by Name.
Thanks !