Search
Calendar.resources Property
See Also
 






Gets the resources whose schedule to display when the groupType property is set to GroupByResources or FilterByResources.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

get resources() {}
set resources(value) {}

 Property Value

An ObservableCollection containing the Resources.

 Example

The following function groups calendar items according to the GroupType value provided as parameter and assigns the value to the groupType property. If grouping is done by resources, the method imports the resources to group by from the schedule.

JavaScript  Copy Code
function group(value) {
 calendar.contacts.clear();
 if (value == p.GroupType.GroupByContacts) {
  // add the contacts by which to group to the calendar.contacts collection
  calendar.contacts.addRange(calendar.schedule.contacts.items());
 }
 calendar.resources.clear();
 if (value == p.GroupType.GroupByResources) {
  // add the resources by which to group to the calendar.resources collection
  calendar.resources.addRange(calendar.schedule.resources.items());
 }
 calendar.groupType = value;
}

 See Also