Home Unanswered Active Tags New Question

Calendar Export

Hi Dan,

When I try to export an image of the calendar I get the error 'Object reference not set to an instance of an object.'

This also happens on the demo page as well.

I am using 6.2 sp2

Thanks

Asked by Anonymous 1 year ago.
Replies

This happens because the events are no longer stored in the ViewState by default (since 6.2). I will fix the exception but if you leave your code as it is you will get an empty calendar.

You need to do one of the following:

  • Call DayPilotCalendar1.DataBind() before calling DayPilotCalendar1.DataBind() [recommended]
  • Set StoreEventsInViewState="true"

Comment posted by Dan Letecky 1 year ago.

...before calling DayPilotCalendar1.Export() ... of course

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

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