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

Plan to support GraphSource TwoWay binding mode ?

7 Answers 147 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 21 Mar 2012, 05:06 PM
I'm testing your new diagram component. Keep up the good work !
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.

Rgds,
Robert

7 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 21 Mar 2012, 05:56 PM
Hi Robert,

 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.

Greetings,
Miro Miroslavov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Robert
Top achievements
Rank 1
answered on 21 Mar 2012, 06:39 PM
The idea is to modify the underlying model, which is databound, based on actions on the diagram. Currently, I cannot use GraphSource binding, and I'm affraid that monitoring ItemsChanged event property (add ? delete ?...) to update the underlying model can be complex. Where it can be provided out of the box with two way binding on "smarter" IGraphSource instance.
But I understand your recommandation about this way

Rgds,
Robert
0
Miro Miroslavov
Telerik team
answered on 22 Mar 2012, 07:45 AM
Hello 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.

Kind regards,
Miro Miroslavov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Timo
Top achievements
Rank 1
answered on 30 Mar 2012, 12:19 PM
Hi Miro,

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
0
Miro Miroslavov
Telerik team
answered on 02 Apr 2012, 07:43 AM
Hi 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.

All the best,
Miro Miroslavov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
John
Top achievements
Rank 1
answered on 22 May 2012, 02:11 AM
Hi Miro,

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!
0
Miro Miroslavov
Telerik team
answered on 23 May 2012, 10:08 AM
Hi John,

 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. 

Regards,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Diagram
Asked by
Robert
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Robert
Top achievements
Rank 1
Timo
Top achievements
Rank 1
John
Top achievements
Rank 1
Share this question
or