SortDescriptor
Represents a descriptor for sorting data.
Definition
Namespace:Telerik.WinControls.Data
Assembly:Telerik.WinControls.dll
Syntax:
public class SortDescriptor : INotifyPropertyChanged, INotifyPropertyChangingEx, ICloneable
Inheritance: objectSortDescriptor
Derived Classes:
Implements:
Constructors
Initializes a descriptor with an empty property name and ascending sort direction.
public SortDescriptor()
Initializes a descriptor for the specified property and direction, and associates it with a collection.
public SortDescriptor(string propertyName, ListSortDirection direction, SortDescriptorCollection owner)
The data-item property used as the sort key.
directionListSortDirectionThe order in which values of the property are sorted.
ownerSortDescriptorCollectionThe collection recorded as this descriptor's owner.
Initializes a descriptor for the specified property and sort direction.
public SortDescriptor(string propertyName, ListSortDirection direction)
The data-item property used as the sort key.
directionListSortDirectionThe order in which values of the property are sorted.
Properties
Gets or sets the direction.
public ListSortDirection Direction { get; set; }
The direction.
Gets or sets the owner.
[Browsable(false)]
public SortDescriptorCollection Owner { get; }
The owner.
Represents the index of the property to be used for sorting in a SortDescriptor.
public int PropertyIndex { get; }
The index of the specified property within the data source.
Gets or sets the name of the property.
public string PropertyName { get; set; }
The name of the property.
Methods
Creates a duplicate of the current SortDescriptor instance.
public virtual object Clone()
A new instance of the SortDescriptor that is a copy of the current instance.
Implements:
Raises the PropertyChanged event
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
A PropertyChangedEventArgs instance containing event data.
Raises the PropertyChanged event
protected void OnPropertyChanged(string propertyName)
The name of the property
Raises the event.
protected virtual void OnPropertyChanging(PropertyChangingEventArgsEx e)
The PropertyChangingEventArgs instance containing the event data.
Raises the event.
Events
Occurs after the property name or direction changes.
public event PropertyChangedEventHandler PropertyChanged
Implements:
Occurs before the property name or direction changes; setting Cancel prevents the change.
public event PropertyChangingEventHandlerEx PropertyChanging
Implements: