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

Expand/collapse all button in column header

3 Answers 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeremy
Top achievements
Rank 1
Jeremy asked on 12 Jul 2012, 10:31 PM
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!

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 13 Jul 2012, 06:04 AM
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 >>

0
Jeremy
Top achievements
Rank 1
answered on 13 Jul 2012, 01:52 PM
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?
0
Dimitrina
Telerik team
answered on 17 Jul 2012, 09:08 AM
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.

Tags
GridView
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Jeremy
Top achievements
Rank 1
Share this question
or