BindingSource.ApplySort Method (PropertyDescriptor, ListSortDirection)

 

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

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

abstract ApplySort : 
        property:PropertyDescriptor *
        sort:ListSortDirection -> unit
override ApplySort : 
        property:PropertyDescriptor *
        sort:ListSortDirection -> unit

Parameters

property
Type: System.ComponentModel.PropertyDescriptor

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

sort
Type: System.ComponentModel.ListSortDirection

A ListSortDirection indicating how the list should be sorted.

Exception Condition
NotSupportedException

The data source is not an IBindingList.

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.

.NET Framework
Available since 2.0
Return to top
Show: