Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How can I get chuilds node on a container (Read 3904 times)
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
How can I get chuilds node on a container
Apr 13th, 2009 at 6:44am
Print Post  
I  have a container node
How can I get the  childs node on that container , regarding that my be the container has also a container child

I used ContainsPoint function but it seems very hard to use

is ther any property like nodes to get the chilld of the container node
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: How can I get chuilds node on a container
Reply #1 - Apr 13th, 2009 at 7:05am
Print Post  
I used the new version , digram lite in this topic
http://mindfusion.eu/Forum/YaBB.pl?board=diaglite_disc;action=display;num=1238072329;start=20#20

is that ok?
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: How can I get chuilds node on a container
Reply #2 - Apr 13th, 2009 at 7:22am
Print Post  
but when trying to use it I have an error

Error1The type 'System.Windows.Controls.ContentControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How can I get chuilds node on a container
Reply #3 - Apr 13th, 2009 at 8:32am
Print Post  
You can access the child nodes of a container like this:

Code
Select All
if (container.SubordinateGroup != null)
	foreach (DiagramNode child in container.SubordinateGroup.AttachedNodes)
	...
 



You can't add a reference to a Silverlight assembly to an ASP.NET project. If you need to use Silverlight mode with the updated diagramlite.dll, you will have to rebuild ClientDiagramApp.xap.

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


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: How can I get chuilds node on a container
Reply #4 - Apr 13th, 2009 at 9:01am
Print Post  
SubordinateGroup
is giving me all time null ???????????
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How can I get chuilds node on a container
Reply #5 - Apr 13th, 2009 at 10:13am
Print Post  
If you are using Silverlight mode with the updated assembly from the DiagramLite message board, the group will be lost after postbacks because we haven't implemented serialization there yet. We'll release NetDiagram 3.0.1 next week and it will support containers in Silverlight mode.

Stoyan
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: How can I get chuilds node on a container
Reply #6 - Apr 14th, 2009 at 1:23pm
Print Post  
containerNode.SubordinateGroup.AttachedNodes


this property dioes not get the container of container is child of another container
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How can I get chuilds node on a container
Reply #7 - Apr 14th, 2009 at 2:55pm
Print Post  
This won't get the children of nested containers if that's what you mean. You could write some method to collect all children of a container that takes a DiagramNodeCollection argument where the children are added, and calls itself recursively when it gets to a nested container.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint