DateRangeFilterElement Class

A date range filter element that allows a user to specify a date interval.

Namespace: DevExpress.Xpf.Core.FilteringUI

Assembly: DevExpress.Xpf.Grid.v20.1.dll

Declaration

public class DateRangeFilterElement :
    FilterElement
Public Class DateRangeFilterElement
    Inherits FilterElement

Remarks

TIP

Topic: Filter Elements

Overview

TIP

Demo: Date Range

Requires a WPF Subscription. Download

The image below shows a date range filter element:

<dxg:GridControl x:Name="grid" ... />
<!-- ... -->
<dxfui:DateRangeFilterElement Context="{Binding FilteringContext, ElementName=grid}" FieldName="SalesDate" /> 

FilterModelTemplate Property

Use the FilterElement.FilterModelTemplate property to specify the filter element template.

TIP

Data Context (Binding Source): DateRangeFilterModel

TIP

Demo: Date Range - Range Control Template

Requires a WPF Subscription. Download

<dxfui:DateRangeFilterElement FieldName="OrderDate"
                              Context="{Binding ElementName=grid, Path=FilteringContext}">
    <dxfui:DateRangeFilterElement.FilterModelTemplate>
        <DataTemplate>
            <dxe:RangeControl Name="rangeControl" AllowZoom="False"
                              RangeEnd="{Binding Max}" RangeStart="{Binding Min}"
                              SelectionRangeEnd="{Binding To, Mode=TwoWay}"
                              SelectionRangeStart="{Binding From, Mode=TwoWay}">
                <dxe:RangeControl.Client>
                    <dxcr:DateTimeChartRangeControlClient ItemsSource="{Binding FilterValues}"
                                                          ArgumentDataMember="Value" ValueDataMember="Count"
                                                          GridAlignment="Auto">
                        <dxcr:DateTimeChartRangeControlClient.View>
                            <dxcr:RangeControlClientBarView />
                        </dxcr:DateTimeChartRangeControlClient.View>
                    </dxcr:DateTimeChartRangeControlClient>
                </dxe:RangeControl.Client>
            </dxe:RangeControl>
        </DataTemplate>
    </dxfui:DateRangeFilterElement.FilterModelTemplate>
</dxfui:DateRangeFilterElement>

Limitations

The DateRangeFilterElement is not supported in Server Mode.

See Also