FlexGrid for WPF | ComponentOne
C1.WPF.FlexGridFilter.4.6.2 Assembly / C1.WPF.FlexGrid Namespace / FilterExtensionMethods Class
Members

In This Topic
    FilterExtensionMethods Class
    In This Topic
    Provides extension methods to support grid and column filtering.
    Object Model
    FilterExtensionMethods Class
    Syntax
    'Declaration
     
    Public MustInherit NotInheritable Class FilterExtensionMethods 
    public static class FilterExtensionMethods 
    Remarks

    The extension methods are optional. They are useful for simplifying the syntax and making applications easier to read.

    For example, the code below uses the standard syntax to enable filtering on a grid and to customize the first two column filters:

    // enable filtering using regular syntax var gridFilter = new C1FlexGridFilter(flex); // disable the filter on column 0 var cf = gridFilter.GetColumnFilter(flex.Columns[0]); cf.FilterType = FilterType.None; // show a Condition filter on column 1 cf = gridFilter.GetColumnFilter(flex.Columns[1]); cf.FilterType = FilterType.Condition;

    Using the extension methods, you could re-write this code as follows:

    // enable filtering using extension methods flex.EnableFiltering(true); // disable the filter on column 0 var cf = flex.Columns[0].GetColumnFilter(); cf.FilterType = FilterType.None; // show a Value filter on column 1 var cf = flex.Columns[1].GetColumnFilter(); cf.FilterType = FilterType.Value;
    Inheritance Hierarchy

    System.Object
       C1.WPF.FlexGrid.FilterExtensionMethods

    See Also