Each context menu item can perform one of the following actions:
This action type will execute the JavaScript code set in JavaScript property.
For event context menu, e variable will hold DayPilot.Event object representing the event.
<%= Html.DayPilotMenu("menu", new DayPilotMenuConfig { CssClassPrefix = "menu_", Items = new DayPilot.Web.Mvc.MenuItemCollection { new DayPilot.Web.Mvc.MenuItem { Text = "Open", Action = MenuItemAction.JavaScript, JavaScript = "alert(e.value());"} } }) %>
This action type will navigate to the URL specified using NavigateUrl property (using NavigateUrlTarget as link target). All occurences of "{0}" string in the URL will be replaced by the event id.
<%= Html.DayPilotMenu("menu", new DayPilotMenuConfig { CssClassPrefix = "menu_", Items = new DayPilot.Web.Mvc.MenuItemCollection { new DayPilot.Web.Mvc.MenuItem { Text = "Details", Action = MenuItemAction.NavigateUrl, NavigateUrl = "Event/{0}"} } }) %>
This action type will execute a server-side event handler using AJAX CallBack:
You should specify the Command property - it will be available in the server-side event handler.
<%= Html.DayPilotMenu("menu", new DayPilotMenuConfig { CssClassPrefix = "menu_", Items = new DayPilot.Web.Mvc.MenuItemCollection { new DayPilot.Web.Mvc.MenuItem { Text = "Delete", Action = MenuItemAction.CallBack, Command = "Delete"} } }) %>