Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic how I add a shape node manually (Read 4527 times)
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
how I add a shape node manually
May 25th, 2011 at 10:45am
Print Post  
I want to add a node manually to the diagram
in a web project
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how I add a shape node manually
Reply #1 - May 25th, 2011 at 10:51am
Print Post  
Do you mean you need to draw nodes with the mouse in ImageMap mode?
  
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 I add a shape node manually
Reply #2 - May 25th, 2011 at 10:52am
Print Post  
sorry
I mean programatically
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how I add a shape node manually
Reply #3 - May 25th, 2011 at 10:57am
Print Post  
You can use the diagram.Factory methods for built-in node types, or add nodes to diagram.Nodes for custom types:

var node = new MyNode();
diagram.Nodes.Add(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 I add a shape node manually
Reply #4 - May 25th, 2011 at 11:09am
Print Post  
it works
thanx
  
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 I add a shape node manually
Reply #5 - May 25th, 2011 at 12:43pm
Print Post  
I used the tad to save a class
node.tag = new class

when I am saving
n.tag= nothing

??
  
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 I add a shape node manually
Reply #6 - May 25th, 2011 at 1:21pm
Print Post  
In this topic
http://mindfusion.eu/Forum/YaBB.pl?board=netdg_disc;action=display;num=1254243822;start=

u replied by using this event
void diagram_SerializeTag(object sender, SerializeTagEventArgs e)



but I could not find this event
I am working in a web application Asp.net , vb.net
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how I add a shape node manually
Reply #7 - May 25th, 2011 at 4:50pm
Print Post  
Hi,

It's an event of the Diagram class. In VB.NET you will have to use the AddHandler command to attach a handler dynamically at each page request.

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 I add a shape node manually
Reply #8 - May 26th, 2011 at 8:40am
Print Post  
I did the handler but not firing
What about the class (object) that I will put it in the tag
<Serializable()> _
Public Class test


do I have to inherited from any another class?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how I add a shape node manually
Reply #9 - May 26th, 2011 at 12:25pm
Print Post  
Are you saving binary or XML files? The Serializable attribute should work for binary ones, the SerializeTag event for XML. You might need SerializeTag in any case though, since the control's view state is stored as compressed XML.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint