This question is locked. New answers and comments are not allowed.
I'm trying to highlight (change background color of) the actual rows that have the data I'm filtering for, but it doesn't seem to be working. Basically, when I filter it will show the filtered items along with their parent rows in the hierarchy (which may not have the data I'm filtering for, but from my understanding need to be there to show the child item).
I tried following the Telerik example for the GridView, where it highlights the filtered column, and that works fine. I'm currently testing to see if I can just highlight a cell and it isn't working. Below is my code.
I tried following the Telerik example for the GridView, where it highlights the filtered column, and that works fine. I'm currently testing to see if I can just highlight a cell and it isn't working. Below is my code.
private void MyGridView_Filtered(object sender, Telerik.Windows.Controls.GridView.GridViewFilteredEventArgs e) { foreach(FilterDescriptor descriptor in e.Added) { GridViewColumn column = MyGridView.Columns[descriptor.Member]; foreach(var item in MyGridView.Items) { var match = item; if (descriptor.Operator == FilterOperator.IsGreaterThan && item.Value > Convert.ToInt32(descriptor.Value)) { Dispatcher.BeginInvoke(new Action(() => { MyGridView.CurrentCellInfo = new GridViewCellInfo(match, column); MyGridView.CurrentCell.Background = new SolidColorBrush(Colors.Green); })); } } }}