New to Telerik UI for WinFormsStart a free 30-day trial

Represents a filter condition that can be applied to a data field for filtering operations.

Definition

Namespace:Telerik.WinControls.Data

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class FilterDescriptor : INotifyPropertyChanged, INotifyPropertyChangingEx, ICloneable

Inheritance: objectFilterDescriptor

Derived Classes: CompositeFilterDescriptorDateFilterDescriptorRadValidationRule

Implements: ICloneableINotifyPropertyChangedINotifyPropertyChangingEx

Constructors

C#
public FilterDescriptor()
C#
public FilterDescriptor(string propertyName, FilterOperator filterOperator, object value)
Parameters:propertyNamestringfilterOperatorFilterOperatorvalueobject

Properties

Gets the filter expression.

C#
[Browsable(true)]
public virtual string Expression { get; }
Property Value:

The filter expression.

Gets a value indicating whether this instance is default filter descriptor of the column

C#
[Browsable(true)]
public virtual bool IsFilterEditor { get; set; }
Property Value:

true if this instance is default; otherwise, false.

Gets or sets the operator.

C#
[Browsable(true)]
public virtual FilterOperator Operator { get; set; }
Property Value:

The operator.

Gets or sets the name of the property.

C#
[Browsable(true)]
public virtual string PropertyName { get; set; }
Property Value:

The name of the property.

Gets or sets the value.

C#
[TypeConverter(typeof(FilterValueStringConverter))]
public virtual object Value { get; set; }
Property Value:

The value.

Methods

Creates a copy of the current FilterDescriptor instance.

C#
public virtual object Clone()
Returns:

object

A new instance of FilterDescriptor that is a copy of the current instance.

Implements: ICloneable.Clone()

Retrieves the filtering expression based on the specified filter descriptor and a function used to format the value.

C#
public static string GetExpression(FilterDescriptor filterDescriptor, Function<FilterDescriptor, object> formatValue)
Parameters:filterDescriptorFilterDescriptor

The filter descriptor used to create the filtering expression.

formatValueFunction<FilterDescriptor, object>

A function that takes a filter descriptor and returns an object to be used in the expression.

Returns:

string

A filtering expression that represents the criteria defined by the filter descriptor.

Gets the expression.

C#
public static string GetExpression(FilterDescriptor filterDescriptor)
Parameters:filterDescriptorFilterDescriptor

The filter descriptor.

Returns:

string

Raises the PropertyChanged event

C#
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

A PropertyChangedEventArgs instance containing event data.

Raises the PropertyChanged event

C#
protected void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the property

C#
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)
Parameters:ePropertyChangingEventArgsEx
C#
protected bool OnPropertyChanging(string propertyName, object oldValue, object newValue)
Parameters:propertyNamestringoldValueobjectnewValueobjectReturns:

bool

Returns a string that represents this instance.

C#
public override string ToString()
Returns:

string

A string that represents this instance.

Overrides: object.ToString()

Events

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged

Occurs when a property value is changing.

C#
public event PropertyChangingEventHandlerEx PropertyChanging

Implements: INotifyPropertyChangingEx.PropertyChanging