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

Dynamically adding a DayPilotMenu

Asked by neokglitch
12 years ago.

Is there a way to do this.

I need a different menu for each item.

Or is there a way to use the event bubble as some sort off menu per item.

Comment posted by neokglitch
12 years ago.

I created this but it is not working:

DayPilotMenu menu = new DayPilotMenu();
menu.ID = "CustomMenu1";
MenuItem item = new MenuItem();
item.Text = "Edit...";
item.Action = MenuItemAction.NavigateUrl;
item.NavigateUrl = "test.aspx?id={{0}}";
item.NavigateUrlTarget = "_blank";
menu.MenuItems.Add(item);
DayPilotCalendar1.Controls.Add(menu);

Comment posted by Dan Letecky
12 years ago.

It's possible to have several menu types and assign them to events in BeforeEventRender (e.ContextMenuClientName set to the value of DayPilotMenu.ClientObjectName).

But if you really need item-specific text you should use the bubble.

Comment posted by neokglitch
12 years ago.

Ok i am using the Bubble but how do i get the Start and End from the event.

Comment posted by Dan Letecky
12 years ago.

At this moment, only the event id (PK) is sent to the bubble RenderContent event. You should load other data from the DB.

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