I'm using the scheduler control in TimelineView only. I set the following custom attributes on resources server side in the OnDataBound event, example:
These are the start time and end time of each individual resource's working hours, and are in my code loaded from a database. These attributes are used server side in the OnTimeSlotCreated event successfully.
var startTime = scheduler.get_resources().getResource(0).get_attributes().getAttribute("StartTime");
If I attempt to retrieve the attributes from the event arguments using the following code, the attributes don't exist:
var startTime = eventArgs.get_targetSlot().get_resource().get_attributes().getAttribute("StartTime");
If I call the following function, I am able to get the resource correctly, it's just the attributes that are blank:
resource = eventArgs.get_targetSlot().get_resource();
Is there any way i can retrive my resource attributes successfully from the event arguments or from the scheduler.get_resources() based on the resource key? Optionally, how can i find the index of a resource from the resource collection by the resource key so I can use the getResource(index) function?
I'm using version 2011.1.413.40.