Is it possible to ddd DayPilot:MenuItem items at runtime ?
I'd like to add menu items to a DayPilot:DayPilotMenu at run-time in my c# codebehind.
For example, right click an event, andsay "add subitem x"
Is that possible ?
Thanks, Peter
Asked by peter cli 4 years ago.
You can assign an event-specific context menu in BeforeEventRender event (e.ContextMenuClientName; should be equal to DayPilotMenu.ClientObjectName).
The method of dynamic menu creation from my previous post doesn't allow you to add/remove items during CallBacks/partial PostBacks (only full PostBacks). BeforeEventRender will allow you to create several menus and assign them as needed. Most likely, you won't need a different menu for each event but there will be just a few types of menus based on event type anyway.
Answer posted by Dan Letecky 4 years ago.