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

Show ColumnGroupHeader in ColumnHeader

4 Answers 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Valentin
Top achievements
Rank 1
Iron
Iron
Valentin asked on 01 Aug 2017, 09:39 AM

Hi Telerik,

 

I have a RadGridView with some Columns and 2 ColumnGroups. Each ColumnGroup has 2 Columns.

I want to know if is it possible to "merge" 2 child Columns Header in each ColumnGroup and display the Header ColmunGroup parent. Finally, there is just 1 row, with Column Header and ColumnGroup Header inside.

 

I attached 2 screens to show you the actually result and the objective.

 

Thank you !

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Aug 2017, 06:46 AM
Hello Valentin,

Thank you for the images provided.

In order the merged column headers to be displayed, the headers of the columns need to be displayed as well. Having this in mind, having a single row containing the merged column headers would not be possible out-of-the-box. You may try modifying the default template of the control, but I am afraid that we cannot provide a concrete solution.

Best Regards,
Stefan X1
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.
0
Valentin
Top achievements
Rank 1
Iron
Iron
answered on 04 Aug 2017, 07:44 AM

Hello Stefan,

 

If I understand, it's not possible to merge the 2 rows (parent and children). But there is any possibility to merge 2 columns header, not using ColumnGroup ? Or this is what you said too ?

In my exemple, I have 6 columns : if I set 'Exploitant' for the name of column 2, and I merged headers columns 2 and 3, it will be working ?

 

Thank you.

0
Valentin
Top achievements
Rank 1
Iron
Iron
answered on 04 Aug 2017, 08:21 AM

Hello Stefan,

 

I have an other idea :

For the colums without ColumGroup, I can create a ColumnGroup (with just 1 children column). After and with a template, is it possible to hide children colums ?

Finally, I have 1 row with all ColumnGroups.

 

Thank you.

0
Stefan
Telerik team
answered on 09 Aug 2017, 06:50 AM
Hello Valentin,

I am afraid that simply merging the column headers instead of using the ColumnGroups mechanism would not be possible. As to the possible solution you mentioned, as stated in my previous reply, the ColumnGroups require the headers of the columns to be visible so they are shown as well. Displaying only the ColumnGroups without the headers is not supported by the control. Thus, I cannot confirm that even by editing the default template of the control the desired customization can be achieved.

Regards,
Stefan X1
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
Valentin
Top achievements
Rank 1
Iron
Iron
Answers by
Stefan
Telerik team
Valentin
Top achievements
Rank 1
Iron
Iron
Share this question
or