ערוך

שתף באמצעות


CollectionView.SortDescriptions Property

Definition

Gets a collection of SortDescription structures that describes how the items in the collection are sorted in the view.

public:
 virtual property System::ComponentModel::SortDescriptionCollection ^ SortDescriptions { System::ComponentModel::SortDescriptionCollection ^ get(); };
public virtual System.ComponentModel.SortDescriptionCollection SortDescriptions { get; }
member this.SortDescriptions : System.ComponentModel.SortDescriptionCollection
Public Overridable ReadOnly Property SortDescriptions As SortDescriptionCollection

Property Value

An empty SortDescriptionCollection in all cases.

Implements

Remarks

You cannot add a SortDescription to the returned (empty) collection because the base class CollectionView does not support sorting. Instead, use the derived classes ListCollectionView and BindingListCollectionView that do support sorting. Also, check the CanSort property before adding or removing SortDescription objects to avoid an exception.

Applies to

See also