IBindingList.ApplySort(PropertyDescriptor, ListSortDirection) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sorts the list based on a PropertyDescriptor and a ListSortDirection.
public:
void ApplySort(System::ComponentModel::PropertyDescriptor ^ property, System::ComponentModel::ListSortDirection direction);
public void ApplySort (System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction);
abstract member ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
Public Sub ApplySort (property As PropertyDescriptor, direction As ListSortDirection)
Parameters
- property
- PropertyDescriptor
The PropertyDescriptor to sort by.
- direction
- ListSortDirection
One of the ListSortDirection values.
Exceptions
SupportsSorting is false
.
Remarks
If items are added or removed, these items are placed in the order of the sort.
This method is supported if SupportsSorting is true
; otherwise, this method throws a NotSupportedException.
Notes to Implementers
The implementation of this method should raise a ListChanged event with the Reset enumeration.