I used some code from the Demo, the radpanel with shapes.
When i drag and drop a shape on the diagram and call save, the last added shape is not saved, although it is present in the Items collection of the diagram.
What is the fix for this?
What is missing?
Best Regards
3 Answers, 1 is accepted
0
Zarko
Telerik team
answered on 07 Jun 2013, 10:01 AM
Hi Liviu,
Unfortunately we're not aware of such issue and I wasn't able to reproduce it with our examples so I'd like to ask you for some code snippets or a sample project.
We're looking forward to hearing from you.
I noticed this too. This happens if you try to call diagram.Save() in the ItemsChanged event. It seems like even though the item has been added to the diagram, the Save() command doesn't know about it yet. Not sure if there is a good workaround?
0
Zarko
Telerik team
answered on 09 Dec 2014, 12:02 PM
Hi Brent,
Thank you for the explanation. I was able to reproduce the issue and indeed the problem is that in the ItemsChanged event the adding of the shape is not fully completed.
A possible workaround will be to use a dispatcher:
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.