RadTree grouping

1 posts, 0 answers
  1. Mark de Torres
    Mark de Torres avatar
    58 posts
    Member since:
    Jan 2010

    Posted 25 Jan 2013 Link to this post

    //The code will generate RadTreeNode. The node has multiple subnodes.
    EntityCollection
    <MusicEntity> collection = GetMusicData(); EntityCollection<MusicEntity> collection = GetMusicData(); treMusic.Nodes.Clear(); ArrayList ptnodes = new ArrayList(); RadTreeNode nodeWorkplane = new RadTreeNode(p.PWork); RadTreeNode nodeUser = new RadTreeNode(p.UserProject.Items[0].UserName); RadTreeNode musicgroupnode = new RadTreeNode(p.MusicSubGroup.MusicGroup.Name, String.Empty); RadTreeNode musicsubgroupnode = new RadTreeNode(p.MusicSSubGroup.Name, String.Empty); RadTreeNode musicnode = new RadTreeNode(p.MusicTitle); musicsubgroupnode.Nodes.Add(musicnode); musicgroupnode.Nodes.Add(musicsubgroupnode); nodeUser.Nodes.Add(musicgroupnode); nodeUser.Nodes.Add(nodeWorkplane); pgnodes.Add(nodeUser); foreach (RadTreeNode pg in ptnodes) { treMusic.Nodes.Add(pg); }

    From the code above, this is treenode that will display.

    User1
      -> Music Group node 1
        -> Music SubGroup node 1
             -> Music Node 1
    
      -> Node Workplane 1
    
    User1
      -> Music Group node 2
         -> Music SubGroup node 2
             -> Music Node 2
       -> Node Workplane 2

    My question how i can combine user1 in one node. Thank you for helps. so the following node that i want to achieve:

    User1
          -> Music Group node 1
            -> Music SubGroup node 1
                 -> Music Node 1
    
    
          -> Music Group node 2
             -> Music SubGroup node 2
                 -> Music Node 2
    
          -> Node Workplane 1
          -> Node Workplane 2
Back to Top