Group Class
See Also  Members   Example 
Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace : Group Class

Represents the run-time realization of a group.

Syntax

Visual Basic (Declaration) 
Public Class Group 
   Implements INotifyPropertyChanged 
C# 
public class Group : INotifyPropertyChanged  

Example

All examples in this topic assume that the grid is bound to the Orders table of the Northwind database, unless stated otherwise.
The following example demonstrates how to change the information displayed in each GroupHeaderControl by creating an implicit DataTemplate targeting the Group data type.
XAMLCopy Code
<Grid> 
  <Grid.Resources> 
    <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" 
                                       Source="{Binding Source={x:Static Application.Current}, 
                                                        Path=Orders}"> 
      <xcdg:DataGridCollectionViewSource.GroupDescriptions> 
        <xcdg:DataGridGroupDescription PropertyName="ShipCountry"/> 
      </xcdg:DataGridCollectionViewSource.GroupDescriptions> 
    </xcdg:DataGridCollectionViewSource> 
    <DataTemplate DataType="{x:Type xcdg:Group}"> 
      <StackPanel Orientation="Horizontal"> 
        <TextBlock Text="The "/> 
        <TextBlock Text="{Binding Value}"/> 
        <TextBlock Text=" group contains "/> 
        <TextBlock Text="{Binding Items.Count}"/> 
        <TextBlock Text=" items."/> 
      </StackPanel> 
    </DataTemplate> 
  </Grid.Resources> 
  <xcdg:DataGridControl x:Name="OrdersGrid" 
                        ItemsSource="{Binding Source={StaticResource cvs_orders}}"/> 
</Grid>

Inheritance Hierarchy

System.Object
   Xceed.Wpf.DataGrid.Group

Requirements

Supported Operating Systems: Windows Server 2003 Service Pack 1; Windows Vista; Windows XP Service Pack 2

See Also