I have a table that is displaying some data and I want NOT to show the row if one of the columns is zero. So I thought that this is really easy. I just added a filter like this
Telerik.Windows.Controls.GridViewColumn countColumn =
Telerik.Windows.Controls.GridView.IColumnFilterDescriptor countFilter = countColumn.ColumnFilterDescriptor;
countFilter.FieldFilter.Filter1.Operator = Telerik.Windows.Data.FilterOperator.IsNotEqualTo;
countFilter.FieldFilter.Filter1.Value = 0;
and it worked! Perfect! But now I am able to change the data that gets displayed in this table. If that happens, of course, the filter should be reapplied or because I never told the filter to deactivate itself it should update automatically. Ok, that's not the case but how to do the update? I tried to reapply the filter, I tried to remove the filter and add it again, I tried the Refresh method... Nothing is working - or not working well. Reapplying the filter causes some weird behavior - I guess this is because the data is not yet in the visual tree (???) - for example: Data displayed is ok - now I change the data - filter is reapllied - Zero values still visible - if I now scroll down, they suddenly disappear... This is really awful! How can I achieve such behavior in a simple and clean way? It is possible, right?
A big thanks for any hints and ideas and help,