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

Daypilotmenu context for day calendar NOT event

Asked by Tony
1 month ago.

I created and context menu that work with events and triggers the DayPilotCalendarDay_EventMenuClick() function, however if I wanted to use the context menu to create an event by right clicking on the day calendar, how can I have a secondary context menu that is not even driven and how to handle the callback in the C#.?

thank you

Answer posted by Dan Letecky [DayPilot]
29 days ago.

For the time range selection/grid cell right clicks, you can define the context menu using the ContextMenuSelectionID property.

See also Time Range Context Menu.

Comment posted by Tony
29 days ago.

Thank you.

I did do that, in the design window I set the ContextMenuSelectionID = CalendarContextMenu however the event triggered by the right click goes to the DayPilotCalendarDay_Command(object sender, CommandEventArgs e) function with command = navigate.

ASPX

<daypilot:daypilotmenu id="CalendarContextMenu" MenuTitle="Actions" ShowMenuTitle="true" runat="server" ClientObjectName="CalendarMenu">

<DayPilot:MenuItem Action="PostBack" Command="Create" Text="New Event" Image="../media/create.png" />

</daypilot:daypilotmenu>

Comment posted by Dan Letecky [DayPilot]
29 days ago.

That’s weird. The Command event handler with e.Command set to "navigate" is only fired if you call commandCallBack("navigate") on the client side or when you click a date in the DayPilotNavigator component with BoundDayPilotID/BoundDayPilotClientName property set.

You can test the time range selection context menu in the main ASP.NET Calendar demo page.

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