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 » Bugs » e.InnerHTML Hyperlink error for MonthView

e.InnerHTML Hyperlink error for MonthView

Hi,

I am having problems trying to get a link to work if a single event has to carry over to the next week (say if an event lasted 10 days). The HTML does not seem to recognise the link in this situation.

I am using code similar to the following

On BeforeEventRender event for Month View of Calendar
e.InnerHTML = "<a href='NewPage.aspx?id=" + e.Value + "'>MyLink</a>" + e.InnerHTML;

Thank you for your time and I look forward to your response,
Sandeep
Anonymous - 7/2/2008 6:53:03 PM
I've tried your code in IE7 and FF2 and in both it works fine.

The problem is that it fires EventClick event before it actually goes to the new URL. You could:

1) Disable EventClick by setting EventClickHandling="Disabled".

2) Use custom JavaScript EventClick handler (EventClickHandling="JavaScript"). You would need to play with the hyperlink a little bit so it can be detected in the JavaScript handler. For all other cases you would call dpc.eventClickCallBack, dpc.eventClickPostBack, or any other desired action.
Dan Letecky - 7/3/2008 9:02:12 PM
Post reply