Maintains the ordered sort descriptors applied to a collection view.
The collection sets each descriptor's owner and forwards descriptor changes as collection notifications.
Definition
Namespace:Telerik.WinControls.Data
Assembly:Telerik.WinControls.dll
Syntax:
public class SortDescriptorCollection : NotifyCollection<SortDescriptor>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Inheritance: objectCollection<SortDescriptor>NotifyCollection<SortDescriptor>SortDescriptorCollection
Derived Classes:
Implements:
Inherited Members
Constructors
public SortDescriptorCollection()
Properties
Gets or sets the expression.
public virtual string Expression { get; set; }
The expression.
Gets or sets a value indicating whether fields with names that differ only in the casing should be considered different.
public bool UseCaseSensitiveFieldNames { get; set; }
Methods
Adds the specified property name.
public void Add(string propertyName, ListSortDirection direction)
Name of the property.
directionListSortDirectionThe direction.
Detaches ownership and property-change subscriptions from all descriptors before clearing the collection.
protected override void ClearItems()
Overrides:
Creates a collection notification for an operation involving one descriptor.
protected override NotifyCollectionChangedEventArgs CreateEventArguments(NotifyCollectionChangedAction action, object item, int index)
The collection operation.
itemobjectThe descriptor involved in the operation.
indexintThe descriptor's index.
Returns:NotifyCollectionChangedEventArgs
Event data that includes the descriptor's property name when the item is a SortDescriptor.
Overrides:
Creates a collection notification for an operation that replaces one item with another.
protected override NotifyCollectionChangedEventArgs CreateEventArguments(NotifyCollectionChangedAction action, object oldItem, object item, int index)
The collection operation.
oldItemobjectThe item being replaced.
itemobjectThe replacement item.
indexintThe index of the replacement.
Returns:NotifyCollectionChangedEventArgs
Event data that includes the replacement descriptor's property name when the item is a SortDescriptor.
Overrides:
Inserts a descriptor unless the first descriptor with the same property name has the same direction, then attaches ownership and change notifications.
protected override void InsertItem(int index, SortDescriptor item)
The position at which to insert the descriptor.
itemSortDescriptorThe descriptor to insert.
Overrides:
Removes a descriptor and detaches its owner and property-change subscription.
protected override void RemoveItem(int index)
The position of the descriptor to remove.
Overrides:
Replaces a descriptor and updates ownership and property-change subscriptions for both instances.
protected override void SetItem(int index, SortDescriptor item)
The position of the descriptor to replace.
itemSortDescriptorThe replacement descriptor.
Overrides: