This documentation is archived and is not being maintained.

IBindingList.ApplySort Method

Sorts the list based on a PropertyDescriptor and a ListSortDirection.

[Visual Basic]
Sub ApplySort( _
   ByVal property As PropertyDescriptor, _
   ByVal direction As ListSortDirection _
)
[C#]
void ApplySort(
   PropertyDescriptor property,
 ListSortDirection direction
);
[C++]
void ApplySort(
   PropertyDescriptor* property,
 ListSortDirection direction
);
[JScript]
function ApplySort(
   property : PropertyDescriptor,
 direction : ListSortDirection
);

Parameters

property
The PropertyDescriptor to sort by.
direction
One of the ListSortDirection values.

Exceptions

Exception Type Condition
NotSupportedException This method is not supported.

Remarks

If items are added or removed, these items are placed in the order of the sort.

This method is supported if SupportsSorting is true; otherwise, this method throws a NotSupportedException.

When you call this method, you should raise a ListChanged event with the Reset enumeration.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

IBindingList Interface | IBindingList Members | System.ComponentModel Namespace

Show: