We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

AppendChildren problem

hello

i use the latest version 5.1 and this code does not work :

NodeCollection k=page.GetNodes();
int=0;
int u=this.dgrMyNotes.Model.AppendChildren(k,out i);

why the collection (which is corrrectly populated) is not appendended?

3 Replies

MF Meera Fathima Syncfusion Team May 29, 2007 06:25 AM UTC


Hello John,

Regarding your query, could you please let me know the following details?

1. What that page.GetNodes() method does? Are you doing anything specific within this method?

2. And what is the "page" instance meant for? If possible could you please send me the code implementation of GetNodes() method if you are performing any specific functionality in this.

Also I have tested this case by creating a sample and it seems the Model.AppendChildren() method works fine. You can get the sample from the following link - http://websamples.syncfusion.com/samples/Diagram.Windows/F61523/main.htm

Sample Details :

1. Click on AddTextNode button to append the node collections which has three textnodes into the diagram model.

Please take a look at the sample and let me know if you have any more questions. If you still find any issue with this, could you please modify the provided sample to show the issue?

So that it will be easier for us to have a close look into the issue.

Thanks for your interest in syncfusion products.


Best Regards,
Meera.



JW Jonathan Weizman May 29, 2007 07:50 AM UTC

Thanks for the reply
However in my case it does not work. What's funy is that adding a collection of nodes to a layers does fail also...

NodeCollection nc=page.GetNodes();
myLayer.Add(nc)

nc is not null (page is class that encapsulate the nodes)
but myLayer.Nodes.count=0....


MF Meera Fathima Syncfusion Team May 29, 2007 12:07 PM UTC


Hello John,

I have tested the case by adding nodes collection to the layers and also to the diagram model. and it is working fine. The nodes collection get added fine.

Also please make sure that the layer into which you add the nodes collection is enabled before adding the nodes to it since nodes can be added to the layer only if it is active/enabled.

I have attached the sample that I used for testing. Please download the sample from the following link - http://websamples.syncfusion.com/samples/Diagram.Windows/F61523_AddNodes/main.htm


Sample Details :

1. In this sample, the diagram model has a layer called "Node Layer" that has three text nodes.

2. The node collection that has three text nodes are added to both the layer(Node Layer) and to the diagram model.

Could you please modify the sample if you still have any problem with this.

Thanks,
Meera.

Loader.
Live Chat Icon For mobile
Up arrow icon