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

Editable WPF RadGridView GroupHeader text

1 Answer 256 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 10 Jul 2017, 04:35 PM

Provide us the Editable WPF RadGridView GroupHeader text value example. So that we can rename the Group Header value by double click on header. Our grid view code is -

<telerik:RadGridView x:Name="Gridview"  AutoGenerateColumns="False" ShowGroupPanel="False" ValidatesOnDataErrors="None"
                                  AllowDrop="True" CanUserDeleteRows="True" CanUserInsertRows="True" CanUserSelect="True" CanUserSortGroups="True"
                             AutoExpandGroups="True" GroupRenderMode="Nested"   ItemsSource="{Binding SelectedItems}"
                         SelectionMode="Extended">
            <telerik:RadGridView.GroupHeaderTemplate>
                            <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <CheckBox x:Name="grpCheckbox" IsThreeState="True">
                            <i:Interaction.Behaviors>
                                <behaviors:GroupSelectionBehavior/>
                            </i:Interaction.Behaviors>
                        </CheckBox>
                        <TextBlock Foreground="Black"   Text="{Binding Group.Key}" FontWeight="Bold" ForceCursor="True"/>

                    </StackPanel>
            </DataTemplate>
            </telerik:RadGridView.GroupHeaderTemplate>

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 13 Jul 2017, 01:46 PM
Hi Rajesh,

Thank you for your interest in RadGridView control.

Editing the group header text is not supported out of the box. Basically, this customization can be achieved by editing the default template of the control. The approach of achieving this is discussed with examples in the How to Group Header Caption forum thread. Can you please take a look at it? Note, that in the article is modifying the template of GridViewGroupRow is discussed. Such approach is applicable if you are using the default value for the GroupRenderMode property of RadGridView - the Nested one. If you have set it to Flat mode, you need to edit the template of the GroupHeaderRow element. More information can be found in the Grouping Modes topic.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or