This is a migrated thread and some comments may be shown as answers.

Filter Funnel Doesn't Light When Filters Applied

2 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 09 Jul 2012, 03:34 PM
I am currently using the FilteringControl property of a column to replace the default Telerik filtering control with one of my own design. My custom filter control implements IFilteringControl as specified in the documentation. The control works as expected, and the column is filtering properly per the parameters entered. However, the filter icon does not currently light up when filtering is applied. From the interface spec, I would assume that the IsActive property of my custom class should be controlling whether the funnel icon is lit or not, but the funnel icon remains unlit regardless of whether IsActive is true or false. Is IsActive the proper mechanism to control the funnel icon state? If not, is there some other mechanism I should be using? I am implementing IsActive as a simple property, like so:
public bool IsActive { get; set; }

In the code where I add or remove filters, I end the block with the following statement:

if (filterCollection.FilterDescriptors.Count > 0)
  this.IsActive = true;
else
  this.IsActive = false;

Can someone tell me what I might be doing wrong?

2 Answers, 1 is accepted

Sort by
0
Accepted
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 09 Jul 2012, 08:15 PM
Are you implementing IFilteringControl

secondly
my custom filters use dependency propertys for isactive like
Public Shared ReadOnly IsActiveProperty As DependencyProperty = DependencyProperty.Register("IsActive",
            GetType(Boolean),
            GetType(filterEnum),
            New System.Windows.PropertyMetadata(False))
Public Property IsActive As Boolean Implements Telerik.Windows.Controls.GridView.IFilteringControl.IsActive
    Get
        Return CBool(GetValue(IsActiveProperty))
    End Get
    Set(ByVal value As Boolean)
        SetValue(IsActiveProperty, value)
    End Set
End Property

0
Nick
Top achievements
Rank 1
answered on 09 Jul 2012, 09:21 PM
Oh. How foolish of me. Of *course* IsActive has to be a DependancyProperty. The tutorial I was following didn't make that very clear, but it does make perfect sense. Thanks, mate.
Tags
GridView
Asked by
Nick
Top achievements
Rank 1
Answers by
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Nick
Top achievements
Rank 1
Share this question
or