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

Event for ContextMenuSelection

Asked by Patrick
7 years ago.

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;
}
}

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