C1.WPF.FlexGrid Namespace : FilterExtensionMethods Class |
'Declaration Public MustInherit NotInheritable Class FilterExtensionMethods
public static class FilterExtensionMethods
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;
System.Object
C1.WPF.FlexGrid.FilterExtensionMethods
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2