CollectionView.SortDescriptions Egenskap

Definition

Hämtar en samling SortDescription strukturer som beskriver hur objekten i samlingen sorteras i vyn.

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

Egenskapsvärde

En tom SortDescriptionCollection i alla fall.

Implementeringar

Kommentarer

Du kan inte lägga till en SortDescription i den returnerade (tomma) samlingen eftersom basklassen CollectionView inte stöder sortering. Använd i stället de härledda klasserna ListCollectionView och BindingListCollectionView som stöder sortering. Kontrollera också egenskapen CanSort innan du lägger till eller tar bort SortDescription objekt för att undvika ett undantag.

Gäller för

Se även