Expand/collapse all button in column header

4 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    5 posts
    Member since:
    Jul 2012

    Posted 12 Jul 2012 Link to this post

    Hi Telerik Team, I have a hierarchical grid set up, and would like to add an expand/collapse all button in the header of the column that has the "+" and "-" buttons that expand and collapse the inner grids. I've attached an image to show what I mean as well, is it possible to access the space there? Thanks!
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 13 Jul 2012 Link to this post

    Hi,

    The GridView columns Header property is an object and you can place anything inside it, in your case an expand/collapse all button. 

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Jeremy
    Jeremy avatar
    5 posts
    Member since:
    Jul 2012

    Posted 13 Jul 2012 Link to this post

    I'm looking at the Columns property on my grid, and the only columns in it are the ones that I've created. I don't see one that contains the expand/collapse buttons, I'm guessing because it is one that is auto generated by the control from the templated hierarchy? Or am I missing something?
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 17 Jul 2012 Link to this post

    Hello,

     If you have defined GridViewToggleRowDetailsColumn, then you could define the header for it. Otherwise you will need to predefine the template of the GridViewHeaderRow and place the expand/collapse all button in the PART_HierarchyIndentPresenter. You could check this help article for more information.

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top