GroupDescriptors and Groups

4 posts, 1 answers
  1. Ryan
    Ryan avatar
    2 posts
    Member since:
    Aug 2011

    Posted 01 Feb Link to this post

    Hello,

    I'm trying to figure out how to relate GroupDescriptors that I add to my Grid with the Groups that get created from them.  I essentially want to say "Group my Grid by column X (using a ColumnGroupDescriptor), and have that group be expanded by default."  I don't want *all* groups to be expanded by default, though, just specific ones.

    I see that there is an ExpandGroup() method exposed off of GridView that can expand individual groups for me, but I don't see how the actual groups in GridView.Items.Groups are related to the GroupDescriptors used to create them.

     Is there a good way for me to accomplish this?

     

    Thanks,

    Ryan

  2. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 04 Feb Link to this post

    Hello Ryan,

    In order to guide you accordingly, can you please clarify whether you need to expand a particular group/groups, or just the groups created by a given ColumnGroupDescriptor?

    Best Regards,
    Stefan X1
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ryan
    Ryan avatar
    2 posts
    Member since:
    Aug 2011

    Posted 04 Feb in reply to Stefan X1 Link to this post

    Hi Stefan,

    I need to have all groups for a given ColumnGroupDescriptor expanded by default, not a particular group/groups.

     

  5. Answer
    Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 08 Feb Link to this post

    Hello Ryan,

    Thank you for clarifying this.

    I am afraid that there is no out-of-the-box mechanism for such scenario.

    However, a possible solution might be to use the fact, that the index each IGroupDescriptor within the GroupDescriptors collection of RadGridView, corresponds to a given level of IGroups from the Items.Groups collection of the control. In other words said, they are added in the same order and this order is kept irrelevant to how many nested groups are defined.

    So, having the index of a given ColumnGroupDescriptor, you should be able to traverse down to the relevant level of IGroups through the Subgroups collection of each IGroup.

    I hope this suggestion fits your requirements. Let me know in case you need further assistance.

    All the best,
    Stefan X1
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top