Class
FilterDescriptor

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:

cs-api-definition
public class FilterDescriptor : INotifyPropertyChanged, INotifyPropertyChangingEx, ICloneable

Inheritance: objectFilterDescriptor

Derived Classes: CompositeFilterDescriptorDateFilterDescriptorRadValidationRule

Implements: ICloneableINotifyPropertyChangedINotifyPropertyChangingEx

Constructors

FilterDescriptor()

Declaration

cs-api-definition
public FilterDescriptor()

FilterDescriptor(string, FilterOperator, object)

Declaration

cs-api-definition
public FilterDescriptor(string propertyName, FilterOperator filterOperator, object value)

Parameters

propertyName

string

filterOperator

FilterOperator

value

object

Properties

Expression

Gets the filter expression.

Declaration

cs-api-definition
[Browsable(true)]
public virtual string Expression { get; }

Property Value

string

The filter expression.

IsFilterEditor

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

Declaration

cs-api-definition
[Browsable(true)]
public virtual bool IsFilterEditor { get; set; }

Property Value

bool

true if this instance is default; otherwise, false.

Operator

Gets or sets the operator.

Declaration

cs-api-definition
[Browsable(true)]
public virtual FilterOperator Operator { get; set; }

Property Value

FilterOperator

The operator.

PropertyName

Gets or sets the name of the property.

Declaration

cs-api-definition
[Browsable(true)]
public virtual string PropertyName { get; set; }

Property Value

string

The name of the property.

Value

Gets or sets the value.

Declaration

cs-api-definition
[TypeConverter(typeof(FilterValueStringConverter))]
public virtual object Value { get; set; }

Property Value

object

The value.

Methods

Clone()

Creates a copy of the current FilterDescriptor instance.

Declaration

cs-api-definition
public virtual object Clone()

Returns

object

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

Implements ICloneable.Clone()

GetExpression(FilterDescriptor)

Gets the expression.

Declaration

cs-api-definition
public static string GetExpression(FilterDescriptor filterDescriptor)

Parameters

filterDescriptor

FilterDescriptor

The filter descriptor.

Returns

string

GetExpression(FilterDescriptor, Function<FilterDescriptor, object>)

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

Declaration

cs-api-definition
public static string GetExpression(FilterDescriptor filterDescriptor, Function<FilterDescriptor, object> formatValue)

Parameters

filterDescriptor

FilterDescriptor

The filter descriptor used to create the filtering expression.

formatValue

Function<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.

OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)

Parameters

e

PropertyChangedEventArgs

A PropertyChangedEventArgs instance containing event data.

OnPropertyChanged(string)

Raises the PropertyChanged event

Declaration

cs-api-definition
protected void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

The name of the property

OnPropertyChanging(PropertyChangingEventArgsEx)

Declaration

cs-api-definition
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)

Parameters

e

PropertyChangingEventArgsEx

OnPropertyChanging(string, object, object)

Declaration

cs-api-definition
protected bool OnPropertyChanging(string propertyName, object oldValue, object newValue)

Parameters

propertyName

string

oldValue

object

newValue

object

Returns

bool

ToString()

Returns a string that represents this instance.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents this instance.

Overrides object.ToString()

Events

PropertyChanged

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged

PropertyChanging

Occurs when a property value is changing.

Declaration

cs-api-definition
public event PropertyChangingEventHandlerEx PropertyChanging

Event Value

PropertyChangingEventHandlerEx

Implements INotifyPropertyChangingEx.PropertyChanging