DayPilot Knowledge Base

AJAX Calendar/Scheduling Controls
DayPilot Pro (AJAX Calendar Control)
» DayPilot AJAX Calendar
DayPilot Pro (AJAX Monthly Calendar Control)
» DayPilot AJAX Monthly Calendar
DayPilot Pro (AJAX Scheduler Control)
» DayPilot AJAX Scheduler
DayPilot » Knowledge Base » How to open an event edit dialog from a context menu (Calendar)

How to open an event edit dialog from a context menu (Calendar)

Last revision: May 15, 2012

calendar-context-menu-edit-dialog.png

Opening a modal dialog with event details (editing) from a context menu is easy:

1. Create Edit.aspx page with the edit form and include editEvent() function in the page with the Calendar control as described here:

2. Add a new item to the context menu that will call editEvent() function:

    <daypilot:daypilotmenu id="DayPilotMenu1" runat="server" CssClassPrefix="menu_" ShowMenuTitle="true">
        <DayPilot:MenuItem Text="Open" Action="JavaScript" JavaScript="edit(e);" ></DayPilot:MenuItem>
    </daypilot:daypilotmenu> 

Related

How to show event-specific context menu
How to implement Copy & Paste in the Calendar
How to show a modal dialog in ASP.NET MVC 3 Razor
How to show event details in a modal dialog (modal.js)