Hey everyone,
I tried to call a method in my contoller via a the MenuItemAction. In the normal ContextMenu the "OnEventMenuClick" event gets fired.
So I want to know which event is for the ContextMenuSelection? and where do i have to implement it?
Here my Code:
ContextMenuSelection:
@Html.DayPilotMenu("menu_selection", new DayPilotMenuConfig
{
Items = new DayPilot.Web.Mvc.MenuItemCollection
{
new MenuItem { Text = "Einfügen", Action = DayPilot.Web.Mvc.Enums.MenuItemAction.CallBack, Command="test" }
}
})
@Html.DayPilotScheduler("dps", new DayPilotSchedulerConfig
{
.....
ContextMenuSelection="menu_selection",
.....
}
Controller:
protected override void OnEventMenuClick(EventMenuClickArgs e)
{
switch (e.Command)
{
case "Delete":
new EventManager().EventDelete(e.Id);
Update();
break;
case "test":
var test = e;
break;
}
}