Bagikan melalui


BindingList<T>.ApplySortCore Metode

Definisi

Mengurutkan item jika ditimpa dalam kelas turunan; jika tidak, melempar NotSupportedException.

protected:
 virtual void ApplySortCore(System::ComponentModel::PropertyDescriptor ^ prop, System::ComponentModel::ListSortDirection direction);
protected virtual void ApplySortCore (System.ComponentModel.PropertyDescriptor prop, System.ComponentModel.ListSortDirection direction);
abstract member ApplySortCore : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
override this.ApplySortCore : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
Protected Overridable Sub ApplySortCore (prop As PropertyDescriptor, direction As ListSortDirection)

Parameter

prop
PropertyDescriptor

yang PropertyDescriptor menentukan properti untuk diurutkan.

direction
ListSortDirection

Salah ListSortDirection satu nilai.

Pengecualian

Metode tidak ditimpa dalam kelas turunan.

Keterangan

Kelas BindingList<T> tidak menyediakan implementasi dasar pengurutan, jadi ApplySortCore selalu melempar NotSupportedException secara default. Untuk mengaktifkan pengurutan, dapatkan dari BindingList<T> dan lakukan tugas berikut:

Selain itu, Anda mungkin ingin menerapkan properti tambahan SortDirectionCore dan SortPropertyCore pengurutan.

Berlaku untuk