Filter Funnel Doesn't Light When Filters Applied

3 posts, 1 answers
  1. Nick
    Nick avatar
    4 posts
    Member since:
    Mar 2012

    Posted 09 Jul 2012 Link to this post

    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. Answer
    David Ocasio
    David Ocasio avatar
    147 posts
    Member since:
    Nov 2009

    Posted 09 Jul 2012 Link to this post

    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

  3. DevCraft banner
  4. Nick
    Nick avatar
    4 posts
    Member since:
    Mar 2012

    Posted 09 Jul 2012 Link to this post

    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.
Back to Top