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

When Adding Event, Resource Is Null

Asked by Ben
10 years ago.

I have to views in my calendar: 1) day view where all resources are displayed 2) a week view where one resrouce is displayed. I have the following property in the calendar: TimeRangeSelectedJavaScript="addEvent(start, end, resource)"

While in the day view, the resource value works correctly when trying to add a new event. I think click the header (resource name) to go into week for and display seven days worth of events for a specific resource. When I try to add a new event, the resource value is always null.

Answer posted by Dan Letecky [DayPilot]
10 years ago.

I assume you create the columns manually in view #1 (ViewType="Resources"). You probably specify the resource for each of these columns. That's why it's available in TimeRangeSelected.

In view #2 the columns are generated automatically (ViewType="Week"). In this case no resource is specified for the columns. You need to load the current resources id from somewhere else (a dropdown value, query string). Another option is to switch to ViewType="Resources" and create the week view manually (including resource ids).

Let me know if this is not the case.

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