IBindingList.ApplySort(PropertyDescriptor, ListSortDirection) Metoda

Definicja

Sortuje listę na podstawie elementu PropertyDescriptor i .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)

Parametry

property
PropertyDescriptor

Element do sortowania PropertyDescriptor według.

direction
ListSortDirection

Jedna z ListSortDirection wartości.

Wyjątki

Uwagi

Jeśli elementy są dodawane lub usuwane, te elementy są umieszczane w kolejności sortowania.

Ta metoda jest obsługiwana, jeśli SupportsSorting jest true. W przeciwnym razie ta metoda zgłasza błąd NotSupportedException.

Uwagi dotyczące implementowania

Implementacja tej metody powinna wywołać ListChanged zdarzenie z wyliczeniem Reset .

Dotyczy