Gets the comparable value filter.

Namespace: Dapfor.Wpf.Filters
Assembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)

Syntax

C#
public static DataTemplate ComparableValueFilter { get; }
Visual Basic
Public Shared ReadOnly Property ComparableValueFilter As DataTemplate
	Get
Visual C++
public:
static property DataTemplate^ ComparableValueFilter {
	DataTemplate^ get ();
}
F#
static member ComparableValueFilter : DataTemplate with get

Property Value

Type: DataTemplate
The comparable value filter.

Remarks

This filter can be used for all types implementing the IComparable interface. This includes all whole number types (Int32, Byte, ...), with floating comma (Double, Decimal), dates DateTime, TimeSpan, strings (String) and many others.

This filter can be set for a column directly in xaml code:

 Copy imageCopy
<Window x:Class="SomeApplication.MainWindow"
       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       Title="MainWindow" 
       xmlns:my="clr-namespace:Dapfor.Wpf.Controls;assembly=Dapfor.Wpf"
       xmlns:filters="clr-namespace:Dapfor.Wpf.Filters;assembly=Dapfor.Wpf">


   <my:GridControl>
       <my:GridControl.Headers>
           <my:Header>
               <my:Header.Columns>
                   <my:Column Id="idMyColumn" Title="MyColumn" FilterTemplate="{x:Static filters:FilterFactory.ComparableValueFilter}" FilterAlignment="Stretch"/>
               </my:Header.Columns>
           </my:Header>
       </my:GridControl.Headers>
   </my:GridControl>
</Window>

It's also possible to set the filter programmatically:

 Copy imageCopy
Column column = gridControl1.Headers[0]["idMyColumn"];
column.FilterTemplate = FilterFactory.ComparableValueFilter;

See Also