Click here to Skip to main content
12,623,295 members (28,498 online)
Click here to Skip to main content

Stats

129K views
6.1K downloads
57 bookmarked
Posted

Auto-filter for Microsoft WPF DataGrid

, 29 Jan 2009 Eclipse
Allows auto filtering functionality for DataGrid columns.
WPFGridFilter
PowerCollections
PowerCollections.csproj.user
Properties
Stepi.Collections
bin
Filters
Properties
Stepi.UIFilters
bin
Initializers
Properties
Themes
Test.GridSorting
bin
Debug
Test.GridFilter.vshost.exe
Properties

using System;
using System.Reflection;

namespace Stepi.Collections
{
    /// <summary>
    /// Defines the contract for a filter used by the FilteredCollection
    /// </summary>
    public interface IFilter
    {
        /// <summary>
        /// Occurs when the filter has changed and the IsMatch logic has been affected.
        /// </summary>
        event EventHandler FilteringChanged;


        /// <summary>
        /// Gets the property info.
        /// </summary>
        /// <value>The property info.</value>
        PropertyInfo PropertyInfo
        {
            get;
        }

        /// <summary>
        /// Determines whether the specified target is matching the criteria
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns>
        /// 	<c>true</c> if the specified target is matching the criteria; otherwise, <c>false</c>.
        /// </returns>
        bool IsMatch(object target);
    }


    /// <summary>
    /// Generics
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IFilter<T> : IFilter
        where T : IComparable
    { }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Eclipse Public License 1.0

Share

About the Author

Stefan Bocutiu
Software Developer (Senior) Lab49
United Kingdom United Kingdom
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161128.1 | Last Updated 29 Jan 2009
Article Copyright 2009 by Stefan Bocutiu
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid