search
envelope-o
feed
check
Products
DayPilot Pro for JavaScript
DayPilot Pro for ASP.NET WebForms
DayPilot Pro for ASP.NET MVC
DayPilot Pro for Java
DayPilot
»
Forums
Home
Unanswered
Active
Tags
New Question
user
comment-o
ContextMenu Javascript action with Callback in Scheduler not working
Asked by Tom
16 years
ago.
Hi Dan,
I have this unusal problem, I have followed the examples and also looked at you online demo code to but still having no success. The javascript only function works but the callback in the Javascript isn't.
This is my Context Menu
<DayPilot:DayPilotMenu ID="RoomBookingWizardContextMenu" runat="server">
<DayPilot:MenuItem Text="Edit booking" Action="JavaScript" JavaScript="editBooking('{0}');" />
<DayPilot:MenuItem Text="Cancel Booking" Action="JavaScript" Command="Delete" JavaScript="if (confirm('Do you really want to cancel the booking ' + e.text() + ' ?')) RoomBookingWizardScan.eventMenuClickCallBack(e, command);" />
</DayPilot:DayPilotMenu>
This is in my class:
protected void RoomBookingScanWindow_EventMenuClick(object sender, DayPilot.Web.Ui.Events.EventMenuClickEventArgs e)
{
int bookingSeq = Convert.ToInt32(e.ResourceId);
if (e.Command == "Cancel")
{
//my function will go here
}
}
I have run the site in Debug mode and placed a breakpoint at the EventMenuClick but nothing, it never hits the breakpoint.
Any ideas will be much appreciated as I am beginning to pull more and more hair out.
Tom
asp.net
how-to
Comment posted by Dan Letecky
16 years
ago.
Can you post your DayPilotCalendar aspx declaration as well?
The first thing I would check is that ClientObjectName attribute of the DayPilotCalendar control is set to "RoomBookingWizardScan". Although the auto-generated client object name is the same as the object ID on the server side in most cases, it is different when you are using master pages or put DayPilotCalendar into .ascx file.
Comment posted by Dan Letecky
16 years
ago.
If you were putting the breakpoint inside the
if (e.Command ...) {}
block you should also try changing it to
if (e.Command == "Delete") {}
.
Comment posted by man
15 years
ago.
i am not getting e.resourceid here
This question is more than 1 months old and has been closed. Please create a
new question
if you have anything to add.
Tools
E-mail notifications
Feed
Related Questions
Context menu Javascript action
MenuItem wehere Command=Delete and Action=JavaScript fails
"CommandHandler is not a function" JavaScript error
Scheduler - Display OK Cancel javascript pop-up on Event Click and delete event if OK
cancel booking
Implementing a 'Break and Reschedule' Function in the Scheduler Component
Preventing move after answering cancel in the modal dialog
getting the column id via context menu javascript
eventmenuclick
How to call a daypilot EventClickJavaScript on button click of ASP.NET WEBFORM - C#
Is it possible to get the same event of DayPilot on Gridview OnRawCommand ?
Issue with context menu command - daypilot version 6.1.2 version
DayPilot dll 6.1.2 - Issue with contextmenu command object - does not have value
onEventMove - cancel on server error