Column group header

2 posts, 0 answers
  1. Rob
    Rob avatar
    8 posts
    Member since:
    Jan 2013

    Posted 28 May 2014 Link to this post

    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
  2. Boris
    Admin
    Boris avatar
    276 posts

    Posted 31 May 2014 Link to this post

    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.
     
Back to Top