Class FilterCondition
Represents a class for FilterCondition and is a child of a RecordFilterDescriptor with filter criteria for displaying only a subset of records from the underlying datasource. FilterCondition elements are stored in a collection that is returned by the Conditions property of a RecordFilterDescriptor.
Implements
Inherited Members
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class FilterCondition : DescriptorBase, ICustomTypeDescriptor, IDisposable, ICloneable
Constructors
FilterCondition()
Initializes a new empty condition.
Declaration
public FilterCondition()
FilterCondition(FilterCompareOperator, Object)
Initializes a new condition with comparison operator and comparison value.
Declaration
public FilterCondition(FilterCompareOperator compareOperator, object compareValue)
Parameters
Type | Name | Description |
---|---|---|
FilterCompareOperator | compareOperator | The comparison operator. |
System.Object | compareValue | The comparison value. |
Properties
Collection
The collection this descriptor belongs to.
Declaration
public FilterConditionCollection Collection { get; }
Property Value
Type |
---|
FilterConditionCollection |
CompareOperator
The comparison operator.
Declaration
public FilterCompareOperator CompareOperator { get; set; }
Property Value
Type |
---|
FilterCompareOperator |
CompareText
The comparison text.
Declaration
public string CompareText { get; set; }
Property Value
Type |
---|
System.String |
CompareValue
The comparison value.
Declaration
public object CompareValue { get; set; }
Property Value
Type |
---|
System.Object |
CustomFilter
An ICustomFilter if FilterCompareOperator.Custom was specified as CompareOperator.
Declaration
public ICustomFilter CustomFilter { get; set; }
Property Value
Type |
---|
ICustomFilter |
FilterDescriptor
The RecordFilterDescriptor this condition belongs to.
Declaration
public RecordFilterDescriptor FilterDescriptor { get; }
Property Value
Type |
---|
RecordFilterDescriptor |
Methods
Clone()
Creates a copy of this object.
Declaration
public virtual FilterCondition Clone()
Returns
Type | Description |
---|---|
FilterCondition | A copy of this object. |
CompareRecord(Record)
Evaluates this condition for the given record and returns True if the record meets the condition.
Declaration
public bool CompareRecord(Record record)
Parameters
Type | Name | Description |
---|---|---|
Record | record | The record to be evaluated. |
Returns
Type | Description |
---|---|
System.Boolean | True if the record meets the condition; False otherwise. |
CompareRecordFilterBar(Record, FieldDescriptor)
Evaluates this condition for the given record and returns True if the record meets the condition.
Declaration
public bool CompareRecordFilterBar(Record record, FieldDescriptor filterBarFieldDescriptor)
Parameters
Type | Name | Description |
---|---|---|
Record | record | The record to be evaluated. |
FieldDescriptor | filterBarFieldDescriptor | If the underlying FilterDescriptor of this condition is the same as filterBarFieldDescriptor, this method will return True. |
Returns
Type | Description |
---|---|
System.Boolean | True if the record meets the condition; False otherwise. |
CopyAllMembersTo(FilterCondition)
Used to copy all the members.
Declaration
protected void CopyAllMembersTo(FilterCondition condition)
Parameters
Type | Name | Description |
---|---|---|
FilterCondition | condition |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code. |
Overrides
GetName()
Determines the name of this object.
Declaration
public override string GetName()
Returns
Type | Description |
---|---|
System.String | Object name. |
Overrides
InitializeFrom(FilterCondition)
Initializes this object and copies properties from another object. PropertyChanging and PropertyChanged events are raised for every property that is modified. If both objects are equal, no events are raised.
Declaration
public void InitializeFrom(FilterCondition other)
Parameters
Type | Name | Description |
---|---|---|
FilterCondition | other | The source object. |
OnPropertyChanged(DescriptorPropertyChangedEventArgs)
Raises the PropertyChanged event.
Declaration
protected virtual void OnPropertyChanged(DescriptorPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DescriptorPropertyChangedEventArgs | e | A DescriptorPropertyChangedEventArgs that contains the event data. |
OnPropertyChanging(DescriptorPropertyChangedEventArgs)
Raises the PropertyChanging event.
Declaration
protected virtual void OnPropertyChanging(DescriptorPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DescriptorPropertyChangedEventArgs | e | A DescriptorPropertyChangedEventArgs that contains the event data. |
Events
PropertyChanged
Occurs when a property is changed.
Declaration
public event DescriptorPropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
DescriptorPropertyChangedEventHandler |
PropertyChanging
Occurs before a property is changed.
Declaration
public event DescriptorPropertyChangedEventHandler PropertyChanging
Event Type
Type |
---|
DescriptorPropertyChangedEventHandler |
Explicit Interface Implementations
ICloneable.Clone()
Declaration
object ICloneable.Clone()
Returns
Type |
---|
System.Object |