BindingSource.ApplySort Method

Definition

Sorts the data source with the specified sort description or descriptions.

Overloads

ApplySort(PropertyDescriptor, ListSortDirection)

Sorts the data source using the specified property descriptor and sort direction.

ApplySort(ListSortDescriptionCollection)

Sorts the data source with the specified sort descriptions.

ApplySort(PropertyDescriptor, ListSortDirection)

Sorts the data source using the specified property descriptor and sort direction.

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)

Parameters

property
PropertyDescriptor

A PropertyDescriptor that describes the property by which to sort the data source.

sort
ListSortDirection

A ListSortDirection indicating how the list should be sorted.

Implements

Exceptions

The data source is not an IBindingList.

Remarks

The IBindingList implements single column sorting using a PropertyDescriptor to indicate a property to sort by and a ListSortDirection indicating whether the property contents should be sorted in ascending or descending order.

ApplySort(ListSortDescriptionCollection)

Sorts the data source with the specified sort descriptions.

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)

Parameters

sorts
ListSortDescriptionCollection

A ListSortDescriptionCollection containing the sort descriptions to apply to the data source.

Implements

Exceptions

The data source is not an IBindingListView.

Remarks

IBindingListView implements multi-column sorting as a set of property descriptor-direction pairs.

Applies to