Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic I want to store some parameters of diagram item in the datebase (Read 1510 times)
ncepu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 25
Joined: Mar 5th, 2012
I want to store some parameters of diagram item in the datebase
Mar 10th, 2012 at 2:51am
Print Post  
Hi,stoyo
I want to store some parameters of diagram item.Maybe,there are ten or twenty parameters on the basis of the type of the items.Whenever I draw a item,I want to set it's parameters.And I want to store this diagram and parameters of the item in the diagram to the database.How can I implement the target use the most simple method?
    Can I use Tag attribute to store these parameters. If it can,and how to implement?
notes:I use Asp.net,JavaApplet mode.
I want your help soon!Thank you!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: I want to store some parameters of diagram item in the datebase
Reply #1 - Mar 11th, 2012 at 8:28am
Print Post  
Hi,

Since TableNodes can store and display tabular data, you could use two-column tables to show the parameter names and values. If you prefer ShapeNodes, you can store additional data in their Tag or Id properties, see this thread for sample code:
http://mindfusion.eu/Forum/YaBB.pl?num=1254243822/15#15

Regarding updating the database, you can do it after the form is posted to the server by iterating over diagram.Nodes and copying data from nodes to their corresponding database records. Alternatively, you can call a web service to update the database from some client side events such as NodeCreated, NodeTextEdited, etc. Calling a service from event is shown in the OrgBrowser example.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint