Bewerken

Delen via


IBindingList.ApplySort(PropertyDescriptor, ListSortDirection) Method

Definition

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

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.

Applies to