BindingSource::ApplySort Method (PropertyDescriptor^, ListSortDirection)
.NET Framework (current version)
Sorts the data source using the specified property descriptor and sort direction.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
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
Available since 2.0
Show: