'Declaration Public Class DateRangeFilter Inherits C1.DataFilter.DateRangeFilterBase
public class DateRangeFilter : C1.DataFilter.DateRangeFilterBase
'Declaration Public Class DateRangeFilter Inherits C1.DataFilter.DateRangeFilterBase
public class DateRangeFilter : C1.DataFilter.DateRangeFilterBase
This class is used to instantiate a filter which can be applied to the Date type values. It helps to filter out the data based on the specified date range. The listing below provides the details about different options that can be set for the filter using this class.
private void InitializeDateRangeFilter()
{
//Initialize the DateRangeFilter
DateRangeFilter dateRangeFilter = new DateRangeFilter();
//Sets the name of the data item property to which the current filter applies
dateRangeFilter.PropertyName = "OrderDate";
//Sets the header text of the filter
dateRangeFilter.HeaderText = "Order Date";
//Sets the maximum value of the range
dateRangeFilter.Maximum = _ordersTable.AsEnumerable().Max(x = >x.Field < DateTime > ("OrderDate"));
//Sets the minimum value of the range
dateRangeFilter.Minimum = _ordersTable.AsEnumerable().Min(x = >x.Field < DateTime > ("OrderDate"));
//Sets the current lower magnitude of the range
dateRangeFilter.LowerValue = new DateTime(2014, 10, 17);
//Adds the DateRangeFilter to the FilterCollection
c1DataFilter1.Filters.Add(dateRangeFilter);
}
System.Object
C1.DataFilter.Filter
C1.DataFilter.DateRangeFilterBase
C1.Win.DataFilter.DateRangeFilter