Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PagedCollectionView.GroupDescriptions Property

Silverlight

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

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

public 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.

Implements

ICollectionView.GroupDescriptions

The following code example demonstrates how to add group descriptions to the GroupDescriptions collection to group data in a DataGrid display. This example is part of a larger example available in the How to: Group, Sort, and Filter Data in the DataGrid Control topic.


if (taskListView.CanGroup == true)
{
    // Group tasks by ProjectName...
    taskListView.GroupDescriptions.Add(new PropertyGroupDescription("ProjectName"));
    // Then group by Complete status.
    taskListView.GroupDescriptions.Add(new PropertyGroupDescription("Complete"));
}


Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2017 Microsoft