DayPilot Forums

DayPilot is the best open-source Outlook-like calendar control for ASP.NET.
DayPilot Pro Demo (Calendar control)
» DayPilot Pro live demo (Calendar control)
DayPilot Pro Demo (Scheduler control)
» DayPilot Pro live demo (Scheduler control)
Home » How To » ContextMenuSelectionID not show until after next postback

ContextMenuSelectionID not show until after next postback

I have a simple form with a day pilot calender,2 buttons and 2 menus.
Pressing the button will assign one of the 2 menus to the calender.

e.g. in button1 click "dp1.ContextMenuSelectionID = "a""
The menu wont appear until after the following post back.
Anonymous - 5/7/2008 4:09:40 PM
I have exactly the same problem, any help is appreciated...
Anonymous - 7/26/2008 3:35:24 PM
You have to assign it on the client side as well:

dpc1.contextMenu = contextMenu1;

Where:
  • "dpc1" is the value of DayPilotCalendar1.ClientObjectName
  • "contextMenu1" is the value of DayPilotMenu1.ClientObjectName
Note that this will get overwritten during the next PostBack by the server-side settings.
Dan Letecky - 8/1/2008 8:58:53 AM
Post reply