search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Day Pilot Calendar event selection on right click

Asked by Rhys
10 years ago.

Hi,

I am trying to get the calendar to seelct the event as well as show a custom context menu when right clicked.

The context menu is working fine but I cant figure out how to select the event. Idealy I would also like to set the MenuTitle property to contain additional information from the event selected when the user right clicks.

Is this possible and how do i do it.

Cheers

Comment posted by Rhys
10 years ago.

Does any one know if this is possible, I have been able to select the event on a right click by setting the EventRightClickHandling to Javascript but that breaks the ContextMenu, I need both to work as users have said that they are finding it difficult to identify which event they have selected when the context meny is loaded?

Answer posted by Dan Letecky [DayPilot]
10 years ago.

You need to customize the EventRightClickJavaScript code to do both actions:

EventRightClickJavaScript="select(e)"
function select(e) {
  e.eventSelect(e);
  menu.show(e);
}

Where menu is the ClientObjectName of the DayPilotMenu control.

You should also set EventSelectHandling to JavaScript to prevent invoking the EventSelect event on the server side.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.