Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic MVC Diagram update from button click (Read 3322 times)
Martin Sher
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Mar 1st, 2013
MVC Diagram update from button click
Mar 2nd, 2013 at 4:23am
Print Post  
Hi,
In an MVC environment I want to have a way to update a diagram with new data. For example, on a grid select a row which then updates the diagram based on data related to teh selected row. I have tried to simulate it with a button.

In the javascript how do I reference the diagramView as all the samplesw provided reference "sender" but this assume a client event generated by the view. My id for the diagramView is diagramView1 but the code
diagramView1.fromJson(result.success);

does not seem to reference the diagramView as diagramView1 is the id for the canvas and not the diagram.

Any help?
Thanks
Martin
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MVC Diagram update from button click
Reply #1 - Mar 4th, 2013 at 7:17am
Print Post  
Hi,

You can get a reference to the JavaScript Diagram object by calling $find(diagramView.Id). For an example, see the DomTree sample project.

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