CollectionView.SortDescriptions Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.NET