This project has moved and is read-only. For the latest updates, please go here.

Need to display RowCount & Rowheader in Grouping

Jun 23, 2014 at 7:05 AM
Edited Jun 23, 2014 at 7:22 AM
I need to display the Row item Count with the Header & the RowHeader within the expand result, is it possible to have it as in the attachment.Image
Jun 23, 2014 at 4:36 PM

I believe you are using the DataGrid from the Xceed.Wpf.Toolkit.

1) To display the number of items in the group, you can define a DataTemplate for groups that displays in red the quantity of items.
2) To display the columnManagerRow in the publisher's groupConfiguration, you can redefine the groupConfiguration of this specific column.

Here's the XAML for the 2 modifications :
      <DataTemplate x:Key="defaultGroupTemplate">
         <StackPanel Orientation="Horizontal"
            <ContentPresenter Content="{Binding Value}"
                              ContentTemplate="{Binding RelativeSource={RelativeSource TemplatedParent},Path=DataContext.ValueTemplate}"
                              ContentTemplateSelector="{Binding RelativeSource={RelativeSource TemplatedParent},Path=DataContext.ValueTemplateSelector}"
                              VerticalAlignment="Center" />
            <TextBlock Text=" ("
                       VerticalAlignment="Center" />
            <TextBlock Text="{Binding ItemCount}"
                       VerticalAlignment="Center" />
            <TextBlock Text=")"
                       VerticalAlignment="Center" />


      <DataTemplate  DataType="{x:Type xcdg:Group}">
         <ContentControl x:Name="groupContentPresenter"
                         ContentTemplate="{StaticResource defaultGroupTemplate}" />

      <xcdg:GroupConfiguration x:Key="PublisherGroupConfiguration">
               <xcdg:ColumnManagerRow />
      <xcdg:DataGridControl x:Name="_datagrid">
            <xcdg:Column FieldName="GameName"

            <xcdg:Column FieldName="Creator">

            <xcdg:Column FieldName="Owner">

            <xcdg:Column FieldName="Publisher"
                         GroupConfiguration="{StaticResource PublisherGroupConfiguration}">
Jun 24, 2014 at 8:24 AM
Edited Jun 24, 2014 at 8:25 AM
Hi BoucherS,
Thanks for the reply. I'm using the ExtendedDataGrid dll from the same solution work in it?
Jun 25, 2014 at 1:24 PM
Hi mightyselva.
I don't use this other DataGrid. You can try it or ask the author of this datagrid.