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

Hide columns header when using ColumnGroupsViewDefinition

3 Answers 153 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Amige
Top achievements
Rank 1
Veteran
Amige asked on 23 Mar 2018, 10:05 PM

Hi,

I am using a GridView with a ColumnGroupsViewDefinition, I would like to display only the group headers and hide the column headers, is there a way to accomplish this?

 

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Mar 2018, 01:35 PM
Hello, Amige, 
  
You can refer to the following forum thread which is quite useful on this topic: https://www.telerik.com/forums/hide-column-header-only

I hope this information helps. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Amige
Top achievements
Rank 1
Veteran
answered on 27 Mar 2018, 07:30 PM

Hello Dess,

I checked the example in the the other topic, they are hiding the group headers and showing the column headers, in my case I need the oposite, hide the column headers and show only the group headers.

I tried to use the code in the example and adapt it to my requirements but with no luck.

Is there a way to accomplish this?

Regards,

Alberto

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Mar 2018, 06:40 AM
Hello, Alberto,  

The initially suggested solution in the referred forum thread is to set the ShowColumnHeaders property to false. Indeed, this achieves the opposite result. However, if you look at the solution using the ViewCellFormatting event you will notice that the columns' headers are actually hidden and the group headers remain displayed. There is also a sample project attached to the reply demonstrating the achieved result. It looks similar to the one you need to achieve according to the provided screenshots. Feel free to follow a similar approach.

If you are still experiencing any further difficulties, you can submit a support ticket providing a sample project which demonstrates the undesired behavior. Thus, our support staff will gladly assist you.

I hope this information helps. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Amige
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Amige
Top achievements
Rank 1
Veteran
Share this question
or