How do I know which group the selected row is in

2 posts, 0 answers
  1. Helen
    Helen avatar
    101 posts
    Member since:
    Nov 2008

    Posted 20 Jan 2011 Link to this post

    How can I tell whether a specific row is in a group, and expand that group?


  2. Milan
    Milan avatar
    1989 posts

    Posted 27 Jan 2011 Link to this post

    Hi Helen,

    Excuse me for the delay. The following snippet show how you can retrieve the group for an item and expand the respective group.

    Hope this helps.

    private void Button1_Click(object sender, RoutedEventArgs e)
        var itemTofind = this.playersGrid.Items[2];
        var group = this.playersGrid.Items.Groups
            .Where(g => g.Items.OfType<object>().Contains(itemTofind)).FirstOrDefault();

    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top