I'm using the IsolatedStorage mechanism to get/set my sorts for all my RadGridView(s)...but I need arrows to indicate ASC or DESC for the user selection from the column headers.
Any tips ?
P.S. I'll also need the same for RadTreeView (which uses manual sorting)
4 Answers, 1 is accepted
To achieve the desired behavior, you can attach to the RadGridView's Loaded event and in it with the extension method ChildrenOfType of the grid to find all Paths with name equal to PART_SortIndicator. Then you only need to change the Fill property with the brushes which you want. For your convenience I prepared a code snippet:
Another approach would be to find this Path element in the default template and change its Fill property there.
I hope that this helps.
Can you "remind me" what the <Path> type is in your snippet ?:
oid RadGridView_Loaded(object sender, RoutedEventArgs e)
var sortIndicators = this.clubsGrid.ChildrenOfType<Path>().Where(x => x.Name =="PART_SortIndicator");
foreach (Path sortIndicator in sortIndicators)
sortIndicator.Fill = Brushes.White;
The full "Path" type in my code snippet is System.Windows.Shapes.Path.
Here you may take a look for detailed information on the matter.
I hope this helps.