We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Databinding Connectors

I played with your databinding feature. It seems that you don't introduce explicitly relationship concept into the model.

So, when I use HierarchicalDataTemplate on my business objects, when I inspect the datacontext of my connectors, it is always equal to the root of the diagram. I expected that it would give me a reference to the two linked node datacontext.

Have I to set explicitely this datacontext or I missed something ?

Tx, 
Robert

3 Replies

SM Sundar M Syncfusion Team May 29, 2012 07:20 AM UTC

Hi Robert,

Regarding DataContext of the LineConnector, be default if you set DataContext for the object, the Content property of the element can be used to refer the business object. In your scenario, the LineConnector will not have the reference of the Business object. You can get the Businees object details by referring LineConnector HeadNode and TailNode property. Please refer the following sample code snippet.

Code Snippet:

object busineesObject=(line.HeadNode as Node).Content;

Here Line is the Instance of LineConnector.

If the above solution does not meet your requirement. Kinldy provide us more information about requirement such as Sample/Video. So the we can investigate more on you requirement.

Please let us know if you have any queries.

Regards,
Sundar M.

 



RJ Robert Johnson May 29, 2012 03:11 PM UTC

Hi,

Unfortunately, if I know what are linked objects, I don't know what property is used to draw this link.
Business objets can be linked by multiple properties.

If I take a class Person and two properties Friends and Colleagues, when I draw my diagram, how I can differentiate the connector which represents Friends property and which represents Colleagues property

var robert = Person{Name="Robert"}
var bob = Person{Name="Bob"}
robert.Friends.Add(bob)
robert.Colleagues.Add(bob)

I hope that this example will help you to understand my query.
Tx,
Robert.


RT Ramya Thirugnanam Syncfusion Team June 4, 2012 08:53 AM UTC

Hi Robert,

With regards to DataBinding Connectors, we are working on your requirement. We will update you with the status of your requirement on June 6th 2012.

Please let us know if you have any concerns,                                                                                               
Regards,
Ramya


Loader.
Live Chat Icon For mobile
Up arrow icon