9 Answers, 1 is accepted
You may clear RadGridView's FilterDescriptors through calling the Clear method.
Vanya Pavlova
the Telerik team

You need to attach to the button's click event and clear the FilterDescriptors collection, as shown below:
private
void
Button_Click(
object
sender, System.Windows.RoutedEventArgs e)
{
this
.playersGrid.FilterDescriptors.Clear();
}
Vanya Pavlova
the Telerik team


1) Check a checkbox in the Filter PopUp to filter on checked element
2) Press Clear All button and do:
this
.playersGrid.FilterDescriptors.Clear();
3) Filter icon is still yellow (indicating we are still filtering) and if you click on the Filter icon, the element is still checked as if it was filtered. Note that this actually shows a false information to the user, because the Filter has been removed, but it is not reflected.How can I do a Clear All on the filters that reflects inside of the Filter PopUps?
Thank You

Code:
MyGrid.FilterDescriptors.Clear();
MyGrid.Rebind();
the filter icon is still there..
You should clear the filters like so:
this
.radGridView.FilterDescriptors.SuspendNotifications();
foreach
(Telerik.Windows.Controls.GridViewColumn column
in
this
.radGridView.Columns)
{
column.ClearFilters();
}
this
.radGridView.FilterDescriptors.ResumeNotifications();
The filtering concept is described in details in the Basic Filtering topic.
Regards,
Didie
Telerik

but in case of Custom Filtering Control inherited from " IFilteringControl " it still shows the filter icon..
i have a Dependency property:
public static readonly DependencyProperty IsActiveProperty =
DependencyProperty.Register("IsActive", typeof(bool), typeof(FilterId), new PropertyMetadata(false));
public bool IsActive
{
get { return (bool)GetValue(IsActiveProperty); }
set { SetValue(IsActiveProperty, value); }
}
but i cant update this from other usercontrols.

Just in case anyone would find this useful:
public void Prepare(Telerik.Windows.Controls.GridViewColumn columnToPrepare) { _column = columnToPrepare; CollectionChangedEventManager.AddHandler(_column.DataControl.FilterDescriptors, FilterDescriptors_CollectionChanged); IFilterDescriptor f = _column.DataControl.FilterDescriptors.OfType<FilterDescriptor>().FirstOrDefault(p => p.Member == "Readiness"); if (f == null) f = _column.DataControl.FilterDescriptors.OfType<CompositeFilterDescriptor>().FirstOrDefault(p => p.FilterDescriptors.OfType<FilterDescriptor>().Any(v => v.Member == "Readiness")); var l = new List<FilterDescriptor>(); if (f is CompositeFilterDescriptor) { l.AddRange((f as CompositeFilterDescriptor).FilterDescriptors.Cast<FilterDescriptor>()); } else if (f is FilterDescriptor) l.Add((f as FilterDescriptor)); IsActive = f != null; foreach (var cb in this.FindVisualChild<Grid>().FindVisualChildren<CheckBox>()) { if (f == null) cb.IsChecked = false; else { cb.IsChecked = (cb == production && l.Any(fd => (ReadinessState)fd.Value == ReadinessState.PRODUCTION)) || (cb == development && l.Any(fd => (ReadinessState)fd.Value == ReadinessState.DEVELOPMENT)); } } }
private void FilterDescriptors_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { var coll = sender as ObservableCollection<IFilterDescriptor>; IFilterDescriptor f = coll.OfType<FilterDescriptor>().FirstOrDefault(p => p.Member == "Readiness"); if (f == null) f = coll.OfType<CompositeFilterDescriptor>().FirstOrDefault(p => p.FilterDescriptors.OfType<FilterDescriptor>().Any(v => v.Member == "Readiness")); CollectionChangedEventManager.AddHandler(coll, FilterDescriptors_CollectionChanged); var l = new List<FilterDescriptor>(); if (f is CompositeFilterDescriptor) { l.AddRange((f as CompositeFilterDescriptor).FilterDescriptors.Cast<FilterDescriptor>()); } else if (f is FilterDescriptor) l.Add((f as FilterDescriptor)); IsActive = f != null; }