BindingSource.ApplySort 方法

定義

使用一或多個指定的排序描述,對資料來源排序。

多載

ApplySort(PropertyDescriptor, ListSortDirection)

使用指定的屬性描述項和排序方向,對資料來源排序。

ApplySort(ListSortDescriptionCollection)

使用指定的排序描述,對資料來源排序。

ApplySort(PropertyDescriptor, ListSortDirection)

使用指定的屬性描述項和排序方向,對資料來源排序。

public:
 virtual void ApplySort(System::ComponentModel::PropertyDescriptor ^ property, System::ComponentModel::ListSortDirection sort);
public virtual void ApplySort (System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection sort);
abstract member ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
override this.ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
Public Overridable Sub ApplySort (property As PropertyDescriptor, sort As ListSortDirection)

參數

property
PropertyDescriptor

PropertyDescriptor,描述排序資料來源所依據的屬性。

sort
ListSortDirection

ListSortDirection,指出應該如何排序清單。

實作

例外狀況

資料來源不是 IBindingList

備註

IBindingList 使用 PropertyDescriptor 來實作單一資料行排序,以指示排序依據的屬性,以及 ListSortDirection 指出屬性內容應該以遞增或遞減順序排序。

適用於

ApplySort(ListSortDescriptionCollection)

使用指定的排序描述,對資料來源排序。

public:
 virtual void ApplySort(System::ComponentModel::ListSortDescriptionCollection ^ sorts);
public virtual void ApplySort (System.ComponentModel.ListSortDescriptionCollection sorts);
abstract member ApplySort : System.ComponentModel.ListSortDescriptionCollection -> unit
override this.ApplySort : System.ComponentModel.ListSortDescriptionCollection -> unit
Public Overridable Sub ApplySort (sorts As ListSortDescriptionCollection)

參數

sorts
ListSortDescriptionCollection

ListSortDescriptionCollection,包含要套用至資料來源的排序描述。

實作

例外狀況

資料來源不是 IBindingListView

備註

IBindingListView 會實作多資料行排序,做為一組屬性描述項方向配對。

適用於