Home Unanswered Active Tags New Question

Menuitem and timeRangeSelected postback

I have set: OnTimeRangeSelected="DayPilotCalendar1_TimeRangeSelected" TimeRangeSelectedHandling="HoldForever" as I like the context Menu. I set <DayPilot:DayPilotMenu ID="menuSelection" runat="server"><DayPilot:MenuItem Text="Add A Passenger" Action="PostBack" /> and have added a response.redirect directive in the timerangeselected code behind but the postback never triggers. am I missing something obvious here? I am using Firefox 3.0.3

Thanks


Asked by Jeff Piper 3 years ago.
Replies

The menu items trigger TimeRangeMenuClick event (not TimeRangeSelected). You will need to check e.Command to detect the menu item that was clicked.

Comment posted by Dan Letecky 3 years ago.

Thanks, I will give that a try.

Comment posted by Jeff Piper 3 years ago.

OK. Added the DayPilotCalendar1_TimeRangeMenuClick(ByVal sender As Object, ByVal e As TimeRangeMenuClickEventArgs) and have added the Command = to the menuitem and set action as postback but the postback is not occuring.

Thanks for the patience with a part time coder.

Comment posted by Jeff Piper 3 years ago.

Just to make sure - have you included the "Handles" clause?

DayPilotCalendar1_TimeRangeMenuClick(ByVal sender As Object, ByVal e As TimeRangeMenuClickEventArgs) Handles DayPilotCalendar1.TimeRangeMenuClick

You have to either use Handles or specify OnTimeRangeMenuClick attribute in the .aspx declaration.

Comment posted by Dan Letecky 3 years ago.

Ah yes, Thanks for the tip. As I say, Part time :)

Comment posted by Jeff Piper 3 years ago.

Nice job, anyway. You were close... ;-)

Comment posted by Dan Letecky 3 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java