The MindFusion Forums | |
Flow Diagramming Components >> ASP.NET >> How do I load xml into ContainerNode??
https://mindfusion.eu/Forum/YaBB.pl?num=1489723046 Message started by JH.Chen on Mar 17th, 2017 at 3:57am |
Title: How do I load xml into ContainerNode?? Post by JH.Chen on Mar 17th, 2017 at 3:57am
I created a new diagram,and load xml into this diagram.
Then I add items from new diagram into my mainDiagram one by one. But if new diagram has group, and node in mainDiagram, the MasterGroup will be gone(null). It will be ungroup. So how can I do ???????? Please tall me~~ |
Title: Re: How do I load xml into ContainerNode?? Post by Slavcho on Mar 17th, 2017 at 6:39am
If you are calling node's copy constructor and adding the copy to main diagram, that won't automatically copy group object and child nodes. You could copy the child nodes separately in a loop and attach them again to master copy. If doing that on server side, you could select all items from the group and call CopySelection and PasteSelection methods with copyGroups argument set to true.
|
Title: Re: How do I load xml into ContainerNode?? Post by JH.Chen on Mar 17th, 2017 at 10:26am
Thanks you,Slavcho.
I'll try this way. If it works, I'll tall you. :) |
Title: Re: How do I load xml into ContainerNode?? Post by JH.Chen on Mar 22nd, 2017 at 12:50am Slavcho wrote on Mar 17th, 2017 at 6:39am:
Hi,Slavcho. Do this way can copy customize object (nodes,links etc.) ?? |
Title: Re: How do I load xml into ContainerNode?? Post by Slavcho on Mar 22nd, 2017 at 6:33am
Do you mean copying your own properties for custom item classes? Diagram.CopySelection calls items' Clone method, and default Clone implementation calls copy constructor of the class. So for custom properties support you must either add a copy constructor or override Clone method in the derived class.
Regards, Slavcho |
Title: Re: How do I load xml into ContainerNode?? Post by JH.Chen on Mar 22nd, 2017 at 6:38am
Thank you,Slavcho.
I got it. |
The MindFusion Forums » Powered by YaBB 2.6.11! YaBB Forum Software © 2000-2025. All Rights Reserved. |