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

Collapsing / Expanding all rows

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 04 Sep 2011, 07:36 AM
Hello,

I'm trying to figure out how to collapse the visible rows, and then to expand them again. Is there a straightforward way to do that?

I'm able to get the correct visual behavior by removing the items from the RadGridView (Collapse) and adding them back (Expand). Is there a better way?

For clarification, here are screenshots of what I'm after:

Expanded state: (see radgridview_expanded.png)

Collapsed state: (see radgridview_collapsed.png)

Thank you,

Jon

1 Answer, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 05 Sep 2011, 07:39 AM
Hi Jon,

You may try to change the ItemsSource of the grid from a filled-in one and an empty one. Thus on clicking each of the buttons, the grid will either be with all its items or with none. You can take a look at this blog post for a reference on similar scenario.
 

Greetings,
Maya
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
GridView
Asked by
Jon
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or