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

Column group header

1 Answer 37 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 28 May 2014, 01:23 PM
Hi,

I'm trying to create a grid with only column group header but no individual column header.
I have added a picture to show what I'm trying to achieve. the + and - button are to add column.

I have created the grid and the column group headers but can't remove the individual column header.
Secondly can I set a minimum size for the column group header, so that if there are not enough column the header title is readable.

Any suggestions to solve my 2 issues would be greatly appreciated.

thanks

1 Answer, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 31 May 2014, 01:02 PM
Hello Rob,

In order to remove the column headers without removing the column group headers you will need to edit the GridViewHeaderRow ControlTemplate. There you can comment out the Border with x:Name ="PART_GridViewHeaderRowBorder" and the DataCellsPresenter with x:Name="PART_DataCellsPresenter". 
As for your second question, you can put in the Header property of the GridViewColumnGroup a TextBlock element and set its TextWrapping property to "Wrap".

Also, I attached a sample project that demonstrates the suggested approach. It uses the NoXaml binaries with the implicit Themes
For more information you can check these articles:

I hope this helps.

Regards,
Boris Penev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Rob
Top achievements
Rank 1
Answers by
Boris
Telerik team
Share this question
or