Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Netdiagram (Read 3825 times)
trigger
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 6
Joined: Oct 16th, 2009
Netdiagram
Oct 16th, 2009 at 3:39pm
Print Post  
Hi all,

I am evaluationg the NetDiagram for ASP.Net  product and really like it,

i just want to know is there any id tie up with a node
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Netdiagram
Reply #1 - Oct 16th, 2009 at 3:56pm
Print Post  
Hi,

The control does not assign any IDs to the nodes. You will have to generate your own identifiers and assign them to the node.Tag property. E.g. one way to do that is to keep a counter as value of Diagram.Tag, assign the counter to each new node and increment it so it has a different value for the next node.

Stoyan
  
Back to top
 
IP Logged
 
trigger
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 6
Joined: Oct 16th, 2009
Re: Netdiagram
Reply #2 - Oct 16th, 2009 at 4:04pm
Print Post  
Hello
Do we have this feature in any sample projects,
I didn't understand what node.tag property
I can create a id for each node.But  how can i assign id to node.tag property

Thanks again.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Netdiagram
Reply #3 - Oct 16th, 2009 at 4:31pm
Print Post  
This example shows generating an id from the current date and time:
https://mindfusion.eu/_samples/netdiag_SqlServerStore.zip

We could modify it to use an integer counter next week if you have trouble doing that yourself.
  
Back to top
 
IP Logged
 
trigger
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 6
Joined: Oct 16th, 2009
Re: Netdiagram
Reply #4 - Oct 19th, 2009 at 8:56am
Print Post  
Hi
now i am getting uniqueid..can you give me how we can assign yo tag prpoerty injavaappletmode
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Netdiagram
Reply #5 - Oct 19th, 2009 at 10:21am
Print Post  
In applet mode you can assign to properties by calling setter methods that have the same name as the property but with a 'set' prefix, so you can assign to Tag by calling node.setTag(id).
  
Back to top
 
IP Logged
 
trigger
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 6
Joined: Oct 16th, 2009
Re: Netdiagram
Reply #6 - Oct 19th, 2009 at 2:47pm
Print Post  
function getUniqueId(){

    var dateObject = new Date();
    var uniqueId = dateObject.getFullYear() + "" + dateObject.getMonth() + "" +
dateObject.getDate() + "" +
dateObject.getTime();
alert(uniqueId); 
    //return uniqueId;
   var a;
document.getElementById("txtUniqueid").value=uniqueId; 


iam using this..BUt i dont know where ineed to callnode.tag peoperty and if you have example please provide for me
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Netdiagram
Reply #7 - Oct 19th, 2009 at 7:04pm
Print Post  
The sample linked above shows that; it sets the Tag value when a node is created:

function onNodeCreated(sender, args)
{
     args.getNode().setTag(getUniqueId()); 
}
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint