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

2 posts, 1 answers
  1. Massimiliano Giustizieri
    Massimiliano Giustizieri avatar
    18 posts
    Member since:
    Oct 2009

    Posted 06 Dec 2012 Link to this post

    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.   
  2. Answer
    Yana avatar
    5042 posts

    Posted 12 Dec 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top