Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need some suggestion on grouping requirement (Read 2261 times)
anurodhora
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 103
Joined: Jan 19th, 2009
Need some suggestion on grouping requirement
Mar 30th, 2009 at 11:40am
Print Post  
Hi,

I need to implement following requirement:

We need to select a group of nodes and if they are of same type (say they have a property type as custom information added to the node) then we will show them in a composite group node which will show the group node images. If they are not of the same type then the grouping operation should be canceled displaying message "can not group, items are not of same type". The group can also be ungroup and restored to the previous state.

The intention behind this is that when we have lots of nodes in the tree so to display them on a single map they become too small (zoomtofit). So the idea here is to group them and display only group nodes, so that the group nodes can be seen more clearly.

How can we achieve above requirement with wpf diagram.

Thanks,
Anurodh
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need some suggestion on grouping requirement
Reply #1 - Mar 30th, 2009 at 12:48pm
Print Post  
If the nodes are in the same tree branch, you couldset the root node of that branch Expandable = true and Expanded = false. This will display a +/- button the user could use to show or hide the child nodes.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
anurodhora
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 103
Joined: Jan 19th, 2009
Re: Need some suggestion on grouping requirement
Reply #2 - Mar 30th, 2009 at 1:21pm
Print Post  
Thanks for the reply. But we want this feature to be available for not connected nodes also.

Actually we would like the user to select the nodes using a draw box to group them and then the operation as explained above should continue.

Thanks,
Anurodh
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need some suggestion on grouping requirement
Reply #3 - Mar 31st, 2009 at 9:41am
Print Post  
Consider using ContainerNodes. You could implement something similar yourself: once the user draws a group box, attach the nodes that intersect with its Bounds using the AttachTo method; that ensures the attached nodes follow the group node when it is moved around. Then loop over groupBox.SubordinateGroup.AttachedNodes and toggle their Visible property when you need to hide or show them.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint