This is a migrated thread and some comments may be shown as answers.

GroupSummaryEvaluate not in WPF?

5 Answers 109 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Brandon asked on 04 Apr 2011, 05:02 PM
In windows forms this function is available to change the headers of each grouping.
How do I accomplish the same functionality in WPF???

Thanks!

5 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 04 Apr 2011, 06:48 PM
Hi Brandon,

 
In RadGridView/WPF you may predefine the group header in each column by predefining its GroupHeaderTemplate, please refer to the markup below:

<telerik:RadGridView x:Name="radGridView1">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="FirstName" DataMemberBinding="{Binding FirstName}">
  <telerik:GridViewDataColumn.GroupHeaderTemplate>
    <DataTemplate>
      <StackPanel Background="Red" Orientation="Horizontal">
                <telerik:RadButton Content="RadButton"/>
                <TextBlock Text="{Binding Group.Key}"/>
<           /StackPanel>
    </DataTemplate>
  </telerik:GridViewDataColumn.GroupHeaderTemplate>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>


You may customize it based on your custom needs.
In case that there is something specific in your scenario and it could be great if you can share with us a little bit more info about the desired final result.


Regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Brandon
Top achievements
Rank 1
answered on 04 Apr 2011, 09:26 PM
I need to change the headers of each INDIVIDUAL group that is generated, not the drag and drop header at the top.

In the WinForms control I could get a handle to each group header when created with the GroupSummaryEvaluate event. This event does not exists in WPF.

So the real question is... how do I get a reference to each grouping header as it is created so I can change the text?
0
Accepted
Vanya Pavlova
Telerik team
answered on 05 Apr 2011, 07:39 AM
Hello Brandon,

 

Thank you for getting back to us! 
Through predefining GridViewDataColumn's GroupHeaderTemplate you may change the text displayed in the header of each GridViewGroupRow. For example the following snippet represents the result from the attached picture:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}">
                   <telerik:GridViewDataColumn.GroupHeaderTemplate>
                       <DataTemplate>
                           <StackPanel Orientation="Horizontal">
                               <TextBlock Text="Grouped by Name: "/>
                               <TextBlock Text="{Binding Group.Key}"/>
                           </StackPanel>
                       </DataTemplate>
</telerik:GridViewDataColumn.GroupHeaderTemplate>


There is no exact equivalent of the GroupSummaryEvaluate event in RadGridView for WPF.
The events related to RadGridView's grouping are Grouping,Grouped.
I strongly recommend you to review our online documentation for further info, please follow this link.
In this way you will get a head start with RadGridView.



If you need any additional information let me know.


All the best,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
ArunVijai
Top achievements
Rank 1
answered on 23 Jan 2014, 12:42 PM
I am using 2013Q3, WPF app

can you please tell me how to get the text in group header , with this code snippet

 <telerik:GridViewDataColumn.GroupHeaderTemplate>
      <DataTemplate>
               <StackPanel Orientation="Horizontal">
                       <TextBlock Text="Here I want the Group Column Name Text"/> --> e.g Country / Worker Name / City
                       <TextBlock Text="{Binding Group.Key}"/> --> Here it displays column data / value --> e.g Italy / Rossi / Rome
               </StackPanel>
      </DataTemplate>
  </telerik:GridViewDataColumn.GroupHeaderTemplate>

Thank you
0
Vanya Pavlova
Telerik team
answered on 27 Jan 2014, 08:13 AM
Hell ArunVijai,


I believe that the following forum thread might be useful for you on that matter, the same is applicable to WPF as well. 
Hope this helps! 



Regards,
Vanya Pavlova
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Brandon
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Brandon
Top achievements
Rank 1
ArunVijai
Top achievements
Rank 1
Share this question
or