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

Menuitem and timeRangeSelected postback

Asked by Jeff Piper
15 years ago.

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


Comment posted by Dan Letecky
15 years ago.

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 Jeff Piper
15 years ago.

Thanks, I will give that a try.

Comment posted by Jeff Piper
15 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 Dan Letecky
15 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 Jeff Piper
15 years ago.

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

Comment posted by Dan Letecky
15 years ago.

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

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