System.ComponentModel.BindingList<T>.ApplySortCore Method

Sorts the items if overridden in a derived class; otherwise, throws a NotSupportedException.

Syntax

protected virtual void ApplySortCore (PropertyDescriptor prop, ListSortDirection direction)

Parameters

prop
A System.ComponentModel.PropertyDescriptor that specifies the property to sort on.
direction
One of the System.ComponentModel.ListSortDirection values.

Remarks

The System.ComponentModel.BindingList`1 class does not provide a base implementation of sorting, so BindingList`1.ApplySortCore(PropertyDescriptor, ListSortDirection) always throws a NotSupportedException by default. To enable sorting, derive from System.ComponentModel.BindingList`1 and perform the following tasks:

In addition, you may want to implement the supplemental BindingList`1.SortDirectionCore and BindingList`1.SortPropertyCore sorting properties.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0