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

Button on Node!

1 Answer 70 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 11 Sep 2013, 10:00 AM
Hi,

i use your OrgChart example which work fine. Now i want to place a button on each node. This button is placed in the
<telerik:RadFluitContentControl.LargeContent> next to the toggle button.

On Click i want to open a database mask for this node. How do i get the selected node in my Click-Event?

Thanks
Best Regards
rene

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 11 Sep 2013, 10:15 AM
Hello ITA,

If the selected node is the one whoose button you have clicked simply use the DataContext of the Button.
It should be the same as the DataContext of the Shape holding the Button. Is this what you need ? If for some reasone these DataContexts are different, you can access the Shape via the following code:

(sender  as RadButton).ParentofType<RadDiagramShape>()
ParentOfType is extension method from Telerik.Windows.Control but we highly suggest you to avoid it if there is a possible way.

Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Diagram
Asked by
ITA
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or