WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RecordFilterDescriptor

    Show / Hide Table of Contents

    Class RecordFilterDescriptor

    Represents a class for RecordFilterDescriptor that provides filter criteria for displaying only a subset of records from the underlying datasource. A filter can be specified through a collection of FilterCondition elements or with a formula expression similar to expressions used in ExpressionFieldDescriptor.

    RecordFilterDescriptors are managed by the RecordFilterDescriptorCollection that is returned by the RecordFilters property of a TableDescriptor.

    Inheritance
    System.Object
    ShouldSerializeBasedPersisterType
    DescriptorBase
    RecordFilterDescriptor
    Implements
    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    System.ICloneable
    IStandardValuesProvider
    Inherited Members
    DescriptorBase.Dispose()
    DescriptorBase.OnDisposed(EventArgs)
    DescriptorBase.CanResetValue()
    DescriptorBase.Reset()
    DescriptorBase.ShouldSerialize()
    DescriptorBase.ToString()
    DescriptorBase.Disposing
    DescriptorBase.InDisposed
    DescriptorBase.IsDisposed
    DescriptorBase.Disposed
    ShouldSerializeBasedPersisterType.GetNewAttributesCount(PropertyDescriptor)
    ShouldSerializeBasedPersisterType.AddNewAttributes(PropertyDescriptor, Attribute[], Int32)
    ShouldSerializeBasedPersisterType.CheckAllProperties
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Grouping
    Assembly: Syncfusion.Grouping.Base.dll
    Syntax
    public class RecordFilterDescriptor : DescriptorBase, ICustomTypeDescriptor, IDisposable, ICloneable, IStandardValuesProvider

    Constructors

    RecordFilterDescriptor()

    Initializes a new empty filter.

    Declaration
    public RecordFilterDescriptor()

    RecordFilterDescriptor(String)

    Initializes a new filter based on a formula expression similar to expressions used in ExpressionFieldDescriptor.

    Declaration
    public RecordFilterDescriptor(string expression)
    Parameters
    Type Name Description
    System.String expression

    A formula expression similar to expressions used in ExpressionFieldDescriptor.

    RecordFilterDescriptor(String, FilterCondition)

    Initializes a new filter based on a collection of FilterCondition.

    Declaration
    public RecordFilterDescriptor(string name, FilterCondition condition)
    Parameters
    Type Name Description
    System.String name

    The name of the field this filter is compared with. This name is used to look up fields in the Fields collection of the parent table descriptor.

    FilterCondition condition

    The condition.

    RecordFilterDescriptor(String, FilterLogicalOperator, FilterCondition[])

    Initializes a new filter based on a collection of FilterCondition.

    Declaration
    public RecordFilterDescriptor(string name, FilterLogicalOperator logicalOperator, FilterCondition[] conditions)
    Parameters
    Type Name Description
    System.String name

    The name of the field this filter is compared with. This name is used to look up fields in the Fields collection of the parent table descriptor.

    FilterLogicalOperator logicalOperator

    The logical operator used if multiple conditions are given.

    FilterCondition[] conditions

    The collection of conditions.

    RecordFilterDescriptor(String, String)

    Initializes a new filter based on a formula expression similar to expressions used in ExpressionFieldDescriptor.

    Declaration
    public RecordFilterDescriptor(string name, string expression)
    Parameters
    Type Name Description
    System.String name

    The name of the field this filter is compared with. This name is used to look up fields in the Fields collection of the parent table descriptor.

    System.String expression

    A formula expression similar to expressions used in ExpressionFieldDescriptor.

    RecordFilterDescriptor(String, String, FilterCondition)

    Initializes a new filter based on a collection of FilterCondition.

    Declaration
    public RecordFilterDescriptor(string name, string mappingName, FilterCondition condition)
    Parameters
    Type Name Description
    System.String name

    The name of the field descriptor.

    System.String mappingName

    The name of the field this filter is compared with. This name is used to look up fields in the Fields collection of the parent table descriptor.

    FilterCondition condition

    The condition.

    RecordFilterDescriptor(String, String, FilterLogicalOperator, FilterCondition[])

    Initializes a new filter based on a collection of FilterCondition.

    Declaration
    public RecordFilterDescriptor(string name, string mappingName, FilterLogicalOperator logicalOperator, FilterCondition[] conditions)
    Parameters
    Type Name Description
    System.String name

    The name of the field descriptor.

    System.String mappingName

    The name of the field this filter is compared with. This name is used to look up fields in the Fields collection of the parent table descriptor.

    FilterLogicalOperator logicalOperator

    The logical operator used if multiple conditions are given.

    FilterCondition[] conditions

    The collection of conditions.

    Properties

    Collection

    The collection this descriptor belongs to.

    Declaration
    public RecordFilterDescriptorCollection Collection { get; }
    Property Value
    Type Description
    RecordFilterDescriptorCollection

    Conditions

    The collection of filter conditions.

    Declaration
    public FilterConditionCollection Conditions { get; }
    Property Value
    Type Description
    FilterConditionCollection

    Expression

    A formula expression similar to expressions used in ExpressionFieldDescriptor.

    Declaration
    public string Expression { get; set; }
    Property Value
    Type Description
    System.String

    FieldDescriptor

    Gets the field descriptor this record filter is applied to.

    Declaration
    public FieldDescriptor FieldDescriptor { get; }
    Property Value
    Type Description
    FieldDescriptor

    FilterDisplay

    Used internally.

    Declaration
    public virtual ArrayList FilterDisplay { get; set; }
    Property Value
    Type Description
    System.Collections.ArrayList

    Format

    Gets or sets the format string. This is used to check the Format while filtering.

    Declaration
    public string Format { get; set; }
    Property Value
    Type Description
    System.String

    LogicalOperator

    The logical operator used if multiple conditions are given.

    Declaration
    public FilterLogicalOperator LogicalOperator { get; set; }
    Property Value
    Type Description
    FilterLogicalOperator

    MappingName

    The name of the field this filter is compared with. This name is used to look up fields in the Fields collection of the parent table descriptor.

    Declaration
    public virtual string MappingName { get; set; }
    Property Value
    Type Description
    System.String

    Name

    The name of this filter descriptor or the name of the field this filter is compared with.

    Declaration
    public virtual string Name { get; set; }
    Property Value
    Type Description
    System.String

    TableDescriptor

    The TableDescriptor that this descriptor belongs to.

    Declaration
    public TableDescriptor TableDescriptor { get; }
    Property Value
    Type Description
    TableDescriptor

    UniqueGroupId

    A UniqueGroupId category the filter belongs to. This property is used by FilterBar to identify the conditions that only belong to a certain uniqueGroupId. All RecordFilter objects that have the same UniqueGroupId will be combined with LogicalOperator.And.

    Declaration
    public object[] UniqueGroupId { get; set; }
    Property Value
    Type Description
    System.Object[]

    Methods

    Clone()

    Creates a copy of this descriptor and all its conditions.

    Declaration
    public virtual RecordFilterDescriptor Clone()
    Returns
    Type Description
    RecordFilterDescriptor

    A copy of this descriptor.

    CompareRecord(Record)

    Evaluates this filter for the given record and returns True if the record meets the filters criteria.

    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 filters criteria; 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.

    CompareUniqueId(Object[])

    Compares the specified Group.UniqueGroupId with this record filters RecordFilterDescriptor.UniqueGroupId. The method is used by FilterBarCells to find the filter criteria that matches the child group that a filter bar belongs to.

    Declaration
    public bool CompareUniqueId(object[] uniqueId)
    Parameters
    Type Name Description
    System.Object[] uniqueId

    A Group.UniqueGroupID to compare.

    Returns
    Type Description
    System.Boolean

    True if both UniqueGroupID are equal.; False otherwise.

    CopyAllMembersTo(RecordFilterDescriptor)

    Copy all the members.

    Declaration
    protected void CopyAllMembersTo(RecordFilterDescriptor rd)
    Parameters
    Type Name Description
    RecordFilterDescriptor rd

    An instance of the RecordFilterDescriptor class.

    CreateFilterConditionCollection(FilterCondition[])

    Creates the FilterConditionCollection list.

    Declaration
    protected virtual FilterConditionCollection CreateFilterConditionCollection(FilterCondition[] conditions)
    Parameters
    Type Name Description
    FilterCondition[] conditions
    Returns
    Type Description
    FilterConditionCollection

    Returns a new instance of FilterConditionCollection.

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    DescriptorBase.Dispose(Boolean)

    Equals(Object)

    Determines whether the specified descriptor object is equal to the current descriptor.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The descriptor object to compare.

    Returns
    Type Description
    System.Boolean

    True if the specified descriptor is equal to the current descriptor; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)

    GetCompiledExpression()

    Gets a string that holds pre-compiled information about the expression.

    Declaration
    public string GetCompiledExpression()
    Returns
    Type Description
    System.String

    A string that holds pre-compiled information about the expression.

    GetCustomPDC(PropertyDescriptorCollection)

    Used to represents the collection of property descriptor.

    Declaration
    protected override PropertyDescriptorCollection GetCustomPDC(PropertyDescriptorCollection baseprops)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptorCollection baseprops

    An instance of the System.ComponentModel.PropertyDescriptorCollection class.

    Returns
    Type Description
    System.ComponentModel.PropertyDescriptorCollection

    An instance of the System.ComponentModel.PropertyDescriptorCollection class.

    Overrides
    ShouldSerializeBasedPersisterType.GetCustomPDC(PropertyDescriptorCollection)

    GetHashCode()

    Serves as a hash function for a particular type.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current object.

    Overrides
    System.Object.GetHashCode()

    GetName()

    Gets the descriptor name.

    Declaration
    public override string GetName()
    Returns
    Type Description
    System.String

    Descriptor name.

    Overrides
    DescriptorBase.GetName()

    InitializeFrom(RecordFilterDescriptor)

    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(RecordFilterDescriptor other)
    Parameters
    Type Name Description
    RecordFilterDescriptor 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.

    ResetCompiledExpression()

    Resets the compiled expression. It will be recompiled later on demand.

    Declaration
    public void ResetCompiledExpression()

    ResetMappingName()

    Resets the name to be empty.

    Declaration
    public void ResetMappingName()

    ResetName()

    Resets the name to be empty.

    Declaration
    public void ResetName()

    ResetUniqueGroupId()

    Resets the UniqueGroupId to null.

    Declaration
    public void ResetUniqueGroupId()

    ShouldSerializeConditions()

    Determines if filter conditions were added.

    Declaration
    public bool ShouldSerializeConditions()
    Returns
    Type Description
    System.Boolean

    True if filter conditions were added; False otherwise.

    ShouldSerializeMappingName()

    Determines if name is not empty.

    Declaration
    public bool ShouldSerializeMappingName()
    Returns
    Type Description
    System.Boolean

    True if the name is not empty.

    ShouldSerializeName()

    Determines if name is not empty.

    Declaration
    public bool ShouldSerializeName()
    Returns
    Type Description
    System.Boolean

    True if name is not empty; False otherwise.

    ShouldSerializeUniqueGroupId()

    Determines if UniqueGroupId should be serialized to code or XML.

    Declaration
    public bool ShouldSerializeUniqueGroupId()
    Returns
    Type Description
    System.Boolean

    True if UniqueGroupId should be serialized; False otherwise.

    Events

    PropertyChanged

    Occurs when a property is changed.

    Declaration
    public event DescriptorPropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    DescriptorPropertyChangedEventHandler

    PropertyChanging

    Occurs before a property is changed.

    Declaration
    public event DescriptorPropertyChangedEventHandler PropertyChanging
    Event Type
    Type Description
    DescriptorPropertyChangedEventHandler

    Explicit Interface Implementations

    IStandardValuesProvider.GetStandardValues(PropertyDescriptor)

    Declaration
    ICollection IStandardValuesProvider.GetStandardValues(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type Description
    System.Collections.ICollection

    ICloneable.Clone()

    Declaration
    object ICloneable.Clone()
    Returns
    Type Description
    System.Object

    Implements

    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    System.ICloneable
    IStandardValuesProvider
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved