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

[Solved] Client-Side Expand/Collapse All

2 Answers 275 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dathan
Top achievements
Rank 1
Dathan asked on 15 Apr 2009, 03:58 PM
This may be a simple one, but I can't seem to find how to do this in the docs:

Is there a setting to show a 'Expand/Collapse All' button on the header of the standard expand/collapse column on a grid?  I am using a client-side standard expand/collapse structure (i.e. specified a nested view), and would like an option to expand/collapse all rows with a single click.  Is there a setting, or do I need to write some js?

Thx

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Apr 2009, 04:31 AM
Hello Dathan,

I believe the code library will help you in achieving the functionality.
ExpandCollapseGroupedGridOnDoubleClickingTheGroupHeader

Another option is that you can place one checkbox in header of the Expandcollapse column as headertemplate and then call the function to expand/collapse the hierarchy. Please refer the code library shown below for this.
Expand/collapse hierarchy client-side on external control click

Thanks,
Princy.
0
Pavlina
Telerik team
answered on 16 Apr 2009, 06:53 AM
Hi Dathan,

The Client-side expand/collapse functionality is demonstrated in the following online resources:
Expand/collapse grouped grid client-side on external control click
Expand/collapse hierarchy client-side on double click

Feel free to utilize the logic presented their for your case in order to attain the functionality you are after.

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Dathan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Pavlina
Telerik team
Share this question
or