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

Recursively expand groups

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Datamex
Top achievements
Rank 2
Datamex asked on 03 Nov 2009, 09:23 AM
Hello,

I have a grid setup with multiple groups. The groups are year, month and day. By default, all groups should be closed except the one of todays date, that one should be expanded.

I've got the code to retrieve the GridGroupHeaderItem object for the group which matches todays date (year-month-day), and I can expand that. But I need all of the above groups (year, month) to be expanded as well. What is a good way of traversing up the group hierarchy to expand all groups above? I would like to make this function recursive so I can use it again some other time, so it ideally shouldn't be fixed to a number of parent levels.

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 06 Nov 2009, 11:13 AM
Hello,

Please take a look at this code library showing how the the desired by you functionality can be implemented and tell me whether you find it useful.

Best wishes,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Datamex
Top achievements
Rank 2
Answers by
Mira
Telerik team
Share this question
or