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

Context Menu with RadDiagram

1 Answer 134 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Sheldon
Top achievements
Rank 1
Sheldon asked on 26 Aug 2020, 10:48 PM
I need a Context Menu to pop up on right-clicking any Shape in RadDiagram, a different Context Menu upon right-clicking a Connection, and nothing at all on right-clicking white space.  I have experimented with setting "RadDiagram1" as a Target, but unlike the OnClick client-side event, which runs only if the user clicks on a shape or connection, setting the entire diagram as a Target does not differentiate between shape, connection and white space when right-clicked. So far, I have not found a way to specify a Shape or Connection as the Target.  Can somebody suggest a solution?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Aug 2020, 02:10 PM

Hi Sheldon,

I am afraid that the desired functionality cannot be achieved with RadDiagram for the moment. You can easily integrate RadDiagram with RadContextmenu control, but the OnClick event of RadDiagram is raised only on left click over a shape/connection and thus you cannot access the shape, over which the context menu is shown. I hope this information will spent you a little time in researching the case.

What you can try is to use Kendo Diagram and ContextMenu as shown in this article: https://docs.telerik.com/kendo-ui/controls/diagrams-and-maps/diagram/how-to/show-context-menu-over-shapes

 

Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Menu
Asked by
Sheldon
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or