Xceed DataGrid for WPF v7.3 Documentation
Xceed.Wpf.DataGrid Assembly / Xceed.Wpf.DataGrid Namespace / Group Class
Members Example


In This Topic
    Group Class
    In This Topic
    Represents the run-time realization of a group.
    Syntax
    'Declaration
     
    Public NotInheritable Class Group 
    'Usage
     
    Dim instance As Group
    public sealed class Group 
    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.
    <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

    Public Properties
     NameDescription
    Public PropertyGets the GroupConfiguration from which the group was created.  
    Public PropertyGets a value indicating whether the group is in the last group level of the group hierarchy.  
    Public PropertyGets or sets a value indicating whether the group is expanded.  
    Public PropertyGets the number of data items contained in the group.  
    Public PropertyGets a value indicating the level of the group within the group hierarchy.  
    Public PropertyGets a reference to the parent groups of the group.  
    Public Property  
    Public PropertyGets a reference to the sibling groups of the group.  
    Public PropertyGets the context from which a statistical function retrieves the values needed to calculate its result, and that exposes the results as properties that have the same names as the functions' ResultPropertyName properties.   
    Public PropertyGets the data displayed in a group's associated GroupHeaderControl.  
    Public PropertyGets the DataTemplate used to display the Title's content.  
    Public PropertyGets a DataTemplateSelector that provides a way to apply a different TitleTemplates based on custom logic.  
    Public PropertyGets an object representing the value which caused the group to be created.  
    Public PropertyGets the format used for the content of the group header. This can also impact the format of the data during export or when copying to the clipboard.  
    Public Property  
    Public PropertyGets the DataTemplate used to display the group's Value.  
    Public PropertyGets a DataTemplateSelector that provides a way to apply a different ValueTemplate based on custom logic.  
    Top
    Public Methods
     NameDescription
    Public Method  
    Top
    Extension Methods
     NameDescription
    Public Extension MethodRetrieves the items for the specified Group.
    Public Extension Method
    Public Extension Method
    Top
    Public Events
     NameDescription
    Public EventRaised when the value of a property changes.  
    Top
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also