This is a migrated thread and some comments may be shown as answers.

Kendo UI Diagram - Save/Edit

3 Answers 149 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
pm
Top achievements
Rank 1
pm asked on 27 Oct 2015, 07:27 PM
Hi,

I have created a kendo ui diagram control using drag drop & trying to save the controls to a data source and retrieve the diagrams when users comes back to site next time.  I am new to kendo ui. Can someone share some sample code?

Thank you.

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 29 Oct 2015, 01:16 PM
Hello,

You can persist the diagram by using dataSources for the shapes and the connections as demonstrated in this demo. The other option is to get the shapes and connections state using the save method and persist it and then apply the state the next time the page is loaded using the load method. I created an example that demonstrates this approach.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
X
Top achievements
Rank 1
answered on 18 May 2017, 03:03 PM

1. The first example is limited as it doesn't restore the x and y coordinates properly. Please could you expand as I really need to do this. I have managed to store the X and Y coordinates in my database when the objects are created and the graph is fine (image 2) but when I restore it I get the problem in image 3.

2. The second example works fine and restores perfectly but if you then click on an element after restore to edit it - it throws a Javascript error (image 4). 

Please can you provide a response on how I fix this problem.

 

0
X
Top achievements
Rank 1
answered on 19 May 2017, 10:46 AM
Got this working now. Thanks.
Tags
Diagram
Asked by
pm
Top achievements
Rank 1
Answers by
Daniel
Telerik team
X
Top achievements
Rank 1
Share this question
or