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

Represents a descriptor for sorting data.

Definition

Namespace:Telerik.WinControls.Data

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class SortDescriptor : INotifyPropertyChanged, INotifyPropertyChangingEx, ICloneable

Inheritance: objectSortDescriptor

Derived Classes: GridSortField

Implements: ICloneableINotifyPropertyChangedINotifyPropertyChangingEx

Constructors

C#
public SortDescriptor()
C#
public SortDescriptor(string propertyName, ListSortDirection direction, SortDescriptorCollection owner)
Parameters:propertyNamestringdirectionListSortDirectionownerSortDescriptorCollection
C#
public SortDescriptor(string propertyName, ListSortDirection direction)
Parameters:propertyNamestringdirectionListSortDirection

Properties

Gets or sets the direction.

C#
public ListSortDirection Direction { get; set; }
Property Value:

The direction.

Gets or sets the owner.

C#
[Browsable(false)]
public SortDescriptorCollection Owner { get; }
Property Value:

The owner.

Represents the index of the property to be used for sorting in a SortDescriptor.

C#
public int PropertyIndex { get; }
Property Value:

The index of the specified property within the data source.

Gets or sets the name of the property.

C#
public string PropertyName { get; set; }
Property Value:

The name of the property.

Methods

Creates a duplicate of the current SortDescriptor instance.

C#
public virtual object Clone()
Returns:

object

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

Implements: ICloneable.Clone()

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

Raises the event.

C#
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)
Parameters:ePropertyChangingEventArgsEx

The PropertyChangingEventArgs instance containing the event data.

Raises the event.

C#
protected virtual bool OnPropertyChanging(string propertyName, object oldValue, object newValue)
Parameters:propertyNamestring

Name of the property.

oldValueobject

The old value.

newValueobject

The new value.

Returns:

bool

Returns [TRUE] If the events is not canceled, otherwise [FALSE].

Events

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged

Occurs when a property value is changing.

C#
public event PropertyChangingEventHandlerEx PropertyChanging

Implements: INotifyPropertyChangingEx.PropertyChanging