Hide columns header when using ColumnGroupsViewDefinition

4 posts, 0 answers
  1. Amige
    Amige avatar
    52 posts
    Member since:
    Dec 2013

    Posted 23 Mar 2018 Link to this post

    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?

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3089 posts

    Posted 27 Mar 2018 Link to this post

    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.
  3. Amige
    Amige avatar
    52 posts
    Member since:
    Dec 2013

    Posted 27 Mar 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    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

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3089 posts

    Posted 29 Mar 2018 Link to this post

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