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

How to have both right-click event command and context menu.

1 Answer 54 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Massimiliano Giustizieri
Top achievements
Rank 1
Massimiliano Giustizieri asked on 06 Dec 2012, 02:04 PM
Dear Telerik Team,

I have included a RadContextMenu in my RadScheduleView control, to be able to create new appointments, and other actions ...
I've noticed that, of course, the context menu appears onto the whole area of the control. Meaning: if I click the resourse header, or the view definition buttons, I can open the context menu in that point.
I would like to avoid this, and would like my context menu opened only by clicking onto an area that really represents a time span (I think it is called the AppointmentsPanel). So I've tried adding my own Command to the right-click event, where I wanted to check the UIElement at the clicked position and determine wheter to show the context menu or not, but I've found out that this was suppressing the context menu because, I thought, they were using the same event and I created a sort of conflict. I used to CommandManager to add the right-click command.
My question then is if it's possible to have both a Command bound to the right-click event, and the RadContextMenu on the same control. My approach seemed correct and I simply have to double-check if I made something wrong? Or there is some technical limitation in adding many actions to the same event? In this case would you suggest following any other way to get this working?
Many thanks!

Kind Regards,

Massimiliano Giustizieri, Italy.   

1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 12 Dec 2012, 09:12 AM
Hi Massimiliano,

I am afraid that currently the needed approach cannot be easily achieved with RadScheduleView -  as you've found we're using the right-click command as well, that's why in your case the context menu cannot be opened.

We're sorry for the inconvenience. We will consider this scenario and will try to find a suitable solution in some of the future versions of RadControls.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Massimiliano Giustizieri
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or