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

DayPilotMenu in MVC

Asked by Anonymous
12 years ago.

Can you use the DayPilotMenu in MVC? I have been unable to find any examples, tutorials, or forum posts on how to do this. If not, is there a context menu available in MVC?

Thank you.

Comment posted by Anonymous
12 years ago.

I have noticed that documentation is lacking for the MVC portion of DayPilot. It seems it's all trial and error.

Answer posted by brandon
12 years ago.
Yes, you can use context menus in DayPilotPro for MVC3. Here's an example:
@Html.DayPilotMenu("menu1", new DayPilotMenuConfig
	{
		CssClassPrefix = "menu_",
		UseShadow = true,
		Items = new DayPilot.Web.Mvc.MenuItemCollection
		{
			new DayPilot.Web.Mvc.MenuItem { Text = "Open", Action = DayPilot.Web.Mvc.Enums.MenuItemAction.JavaScript, JavaScript = "viewDetails(e)"},
			new DayPilot.Web.Mvc.MenuItem { Text = "Delete", Action = DayPilot.Web.Mvc.Enums.MenuItemAction.CallBack, Command = "Delete"},
			new DayPilot.Web.Mvc.MenuItem { Text = "Edit", Action = DayPilot.Web.Mvc.Enums.MenuItemAction.JavaScript, JavaScript = "editEvent(e)"},
		}
	})

And when you set all the properties of your daypilot calendar/month you say
ContextMenu = "menu1",
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.