Recursively expand groups

2 posts, 0 answers
  1. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 03 Nov 2009 Link to this post


    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.
  2. Mira
    Mira avatar
    1124 posts

    Posted 06 Nov 2009 Link to this post


    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,
    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.
Back to Top