'Declaration Public Class RangeFilter Inherits C1.DataFilter.RangeFilterBase
public class RangeFilter : C1.DataFilter.RangeFilterBase
'Declaration Public Class RangeFilter Inherits C1.DataFilter.RangeFilterBase
public class RangeFilter : C1.DataFilter.RangeFilterBase
This class is used to instantiate a filter which can be applied to the number type values. It helps to filter out the data based on the specified numeric range. The listing below provides the details about different options that can be set for the filter using this class.
private void InitializeRangeFilter()
{
//Initialize the RangeFilter
RangeFilter rangeFilter = new RangeFilter();
//Sets the name of the data item property to which the current filter applies
rangeFilter.PropertyName = "Price";
//Sets the header text of the filter
rangeFilter.HeaderText = "Price";
//Sets the maximum value of the range
rangeFilter.Maximum = _carsTable.AsEnumerable().Max(x = >x.Field < double > ("Price"));
//Sets the minimum value of the range
rangeFilter.Minimum = _carsTable.AsEnumerable().Min(x = >x.Field < double > ("Price"));
//Sets the type of editors to be shown
rangeFilter.EditorsType = C1.DataFilter.EditorsType.SpinEditor;
//Sets the amount to increment/decrement when using the up/down buttons of the editors or up/down keys or mouse wheel
rangeFilter.Increment = 1000;
//Sets the number of fractional digits
rangeFilter.Digits = 0;
//Adds the RangeFilter to the FilterCollection
c1DataFilter1.Filters.Add(rangeFilter);
}
System.Object
C1.DataFilter.Filter
C1.DataFilter.RangeFilterBase
C1.Win.DataFilter.RangeFilter