BindingListCollectionView.GroupDescriptions Property

 

Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

public override ObservableCollection<GroupDescription> GroupDescriptions { get; }

Property Value

Type: System.Collections.ObjectModel.ObservableCollection<GroupDescription>

A collection of GroupDescription objects that describe how the items in the collection are grouped in the view.

System_CAPS_noteNote

This property can only be set by accessing the collection object and using its various methods such as Add. The property to access the collection object itself is read-only; the collection itself is read/write.

The following example shows how to use this property:

// This groups the items in the view by the property "Category"
PropertyGroupDescription groupDescription = new PropertyGroupDescription();
groupDescription.PropertyName = "Category";
listingDataView.GroupDescriptions.Add(groupDescription);

For the complete example, see Data Binding Demo.

.NET Framework
Available since 3.0
Return to top
Show: