'Declaration Public MustInherit NotInheritable Class FilterExtensionMethods
public static class FilterExtensionMethods
'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