Export (0) Print
Expand All

DomainDataSource.GroupDescriptors Property

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Gets the collection of grouping objects that are used to organize the data into groups.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.DomainServices (in System.Windows.Controls.DomainServices.dll)

public GroupDescriptorCollection GroupDescriptors { get; private set; }

Property Value

Type: System.Windows.Controls.GroupDescriptorCollection
The collection of grouping objects that are used to organize the data into groups.

The following example shows how to add a value to use for grouping.

<Grid x:Name="LayoutRoot" Background="White">  
    <riaControls:DomainDataSource x:Name="source" QueryName="GetProducts" AutoLoad="true">
        <riaControls:DomainDataSource.DomainContext>
            <domain:ProductDomainContext />
        </riaControls:DomainDataSource.DomainContext>   
        <riaControls:DomainDataSource.GroupDescriptors>
            <riaData:GroupDescriptor PropertyPath="Size" />
        </riaControls:DomainDataSource.GroupDescriptors>
    </riaControls:DomainDataSource>
    <data:DataGrid ItemsSource="{Binding Data, ElementName=source}" />
</Grid>


Show:
© 2014 Microsoft