Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Open popup window on node creation (Read 2454 times)
madhukampurath
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Sep 15th, 2010
Open popup window on node creation
Sep 16th, 2010 at 12:14pm
Print Post  
I am fairly new to netdiagrammer control. I'll explain my problem below.

I am using ImageMap for ClientSideMode. I need to open a popup window with an html form when a node is created. User will then fill this form and submit it. At that time, it should just create a string out of the entered values in the form and set this string to the tag of the node. While reading the diagram, I should get this value also.

I am able to open the popup window - I have set a registerStartupscript for this in the DiagramView_NodeCreated event (Server Side).

In the popup window, I am creating the string out of the values.

However, I am not able to set this string to the tag property of the node. May I know how do I do this ? Basically, I am not able to uniquely locate the currently created node. How do I achieve it?

Thanks

Madhu Kampurath.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Open popup window on node creation
Reply #1 - Sep 16th, 2010 at 1:27pm
Print Post  
The new node should be the last element of the Diagram.Nodes collection, so you should be able to get it via diag.Nodes[diag.Nodes.Count - 1]. If you also need to edit these tag values, you could identify nodes by their ZIndex - it corresponds to the node's index in diagram.Items. E.g. you can store the index value in a hidden field of the edit form, and when it is submitted, assign the tag to diagram.Items[hidden_field_value].

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhukampurath
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Sep 15th, 2010
Re: Open popup window on node creation
Reply #2 - Sep 17th, 2010 at 1:05pm
Print Post  
Hi Stoyo,

Thank you for the suggestion. I will try this and let you know.
  
Back to top
 
IP Logged
 
madhukampurath
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Sep 15th, 2010
Re: Open popup window on node creation
Reply #3 - Sep 22nd, 2010 at 8:52am
Print Post  
Hi Stoyo,

That worked.

There is a small change I had to do. To get the node id, I am using

diag.Nodes.Count + diag.Links.Count - 1.

Many Thanks.

Madhu
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint