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


Asked by Anonymous
11 years ago.


I am trying to get the eventmenuclick handler to work as a postback. I have a scheduler control timerangeselected handling to Hold and a context menu added to the scheduler. My expectation is that the control should post back and I should be able to acton the event in the codebehind. when I select the menu item "Yes" the selection dissappears but I do not get the post back to the event handler. Any help will be appreciated.

code follows:

<DayPilot:DayPilotScheduler ID="Sched" runat="server" BackColor="#FFFFD5"
BorderColor="Black" CellGroupBy="Day" CellSelectColor="#316AC5"
DurationBarColor="Blue" EventBackColor="White" EventBorderColor="Black"
EventHeight="17" HeaderFontColor="Black" HeaderHeight="17"
HourBorderColor="#EAD098" HourNameBackColor="#ECE9D8"
HourNameBorderColor="#ACA899" NonBusinessBackColor="#FFF4BC" ScrollX="0"
ScrollY="0" StartDate="2009-04-02" Width="575px" Visible="False"
BusinessBeginsHour="0" BusinessEndsHour="23" EventClickHandling="PostBack"
Height="100px" style="top: 0px; left: 0px; width: 636px; height: 63px;"
EventClickJavaScript="alert('Eveent with id ' + e.value() + ' clicked.')"
<DayPilot:DayPilotMenu ID="DayPilotMenu2" runat="server"
MenuTitle="Set Service Time?" MenuBackColor="White" MenuBorderColor="#ACA899"
MenuItemColor="#2859AB" MenuTitleBackColor="#ECE9D8">
<DayPilot:MenuItem Text="Yes" Action="PostBack" JavaScript="alert('Opening event (id {0})');" Command="Yes">
<DayPilot:MenuItem Text="Cancel" Action="JavaScript" JavaScript="alert('Sending event (id {0})');">
<DayPilot:MenuItem Text="Remove from service" Action="JavaScript" JavaScript="dps1.commandCallBack('refresh');">



Comment posted by Dan Letecky
11 years ago.

Are you able to check whether the postback is sent to the server from the browser (e.g. using Firefox + Firebug)?

This is a supported scenario and it seems to work fine in the Scheduler demo.

Comment posted by anwar
6 years ago.

4 years old but this is what worked for me

Protected Sub DayPilotScheduler1_EventMenuClick(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.EventMenuClickEventArgs) Handles DayPilotScheduler1.EventMenuClick

Select Case e.Command
Case "Delete"

Case "New"

End Select

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