This being said, I noticed that an exception raised (InvalidOperationException:"Cannot modify the Items collection when GraphSource is set.") is when I edit my diagram ( copy/paste...) if GrapSource is bound to a datasource.
Do you plan to support this scenario ? It would be very useful.
Robert
7 Answers, 1 is accepted
Thank you for your feedback. Unfortunately we support only one direction data-binding for the moment. It is documented in the help too. For the moment we don't have exact date when this will be implemented but we are also considering it. You can also read the Q2 roadmap here.
On a side note, this operation is somewhat considered harmful. It is better to manipulate the items through the ViewModels, so you can handle the Paste event and update your source collection (handle the event too) thus the diagram will be updated from the modified source collection.
Please let us know if you have further feedback or questions.
Thank you.
Miro Miroslavov
the Telerik team
But I understand your recommandation about this way
Rgds,
Robert
Your point is really valid too. Smarter GraphSource interface is something that we also want to have. The Q2 is already planned and the features are on its way, but I can assure you that for Q3 this feature will be in the list.
Any other ideas and feedback are more than welcomed.
Thank you.
Miro Miroslavov
the Telerik team
i am having a similar issue. I am adding a new Shape using a DelegateCommand and then adding my ViewModel to my GraphSources internal items (using the demo NodeViewModelBase). This shows another Shape on the surface like expected. My Problem is, i get an exception when trying to make a connection from one shape to another (on the RadDiagram surface). What is the recomended way doing this with MVVM? Do i have to monitor events to catch the selection of the connector and then provide the drawing of the connection until the button is released myself? Doing this i could add a connection to the GraphSource by bypassing the build in features, but i would have to rebuild all myself.
These are just some quick thoughts. I would appreciate advice how to do this in a better way (perhaps reusing build in functionality).
Kind regards,
Timo
Unfortunately, MVVM is supported only one way and in read-only mode. You can't really workaround this limitation because some key events are still missing like ConnectionAttaching (PreviewConnectionAttached) - they will be available for the official release of the control. Also ItemsChanged is raised too late and in that case is not useful. But please note that we raise this issue's priority, so that we will fix it and support more MVVM scenarios for Q2 and even earlier with some of our internal build.
You can also share more details on your different scenarios and further feature requests and expectations regarding MVVM.
Thank you.
Miro Miroslavov
the Telerik team
Looking at the latest internal build, I don't see any changes from Q1 SP1 regarding RadDiagram. Do you have any idea when TwoWay MVVM support will be available (even in internal builds)? We're building an app that isn't going to be released for quite a while, and it would be nice to have the two-way binding to test and get our app working well with soon.
Thanks!
The Two-Way data binding support will be available in a few weeks with our Q2 release, which is scheduled for the beginning of June.
Please let us know if you have further questions.
Miro Miroslavov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>