JavaScript/jQuery Scheduler - resources
Each element of this array is an object that defines a resource kind - a room, a car or any other resource kind. A resource kind object must have at least the following fields.
dataSource
Specify the available resources of this kind (room1, room2, etc.).fieldExpr
The name of the appointment object field that specifies a resource of this kind (e.g., 'room').
There are more fields that can be specified within a resource kind object. They are listed below. For details on how to define a resource and assign it to scheduler appointments, refer to the Resources article.
See Also
- Demos: Resources | Grouping by Resources
- Resources
colorExpr
Specifies the resource object field that is used as a resource color.
dataSource
This option accepts one of the following.
Array of objects
A simple JavaScript array containing a collection of plain objects.URL
A URL to JSON data or to a service returning data in JSON format.DataSource or its configuration object
A DataSource is an object that provides a handy API for data processing. A DataSource is a stateful object, which means that it saves data processing settings and applies them each time data is loaded. All underlying data access logic of a DataSource is isolated in a Store. A Store provides an API for reading and modifying data. Unlike the DataSource, a Store is a stateless object.
.
, ,
, :
, [
, and ]
. Their presence may cause issues in the widget's operation.The resource objects must have particular fields so that the Scheduler widget can present the resources for end users. For details, refer to the Define Resources topic.
displayExpr
Specifies the resource object field whose value is displayed by the Resource editor in the Appointment popup window.
To allow end users to choose a required resource for an appointment, there is a field in the Appointment popup window. This field's label is specified by the label field of the resource kind object. The editor that is used to select a resource depends on the value of the allowMultiple field. The TagBox widget is used when a multiple selection is possible. The SelectBox widget is used when a single resource can be selected only. Both these widgets have the displayExpr and valueExpr options for specifying the displayed text and actual value of the selected item. These options are set to the displayExpr and valueExpr field values of the resource kind object, respectively.
field
Use the fieldExpr property instead.
Use this option to declare how to call an appointment field to specify a resource of this kind. In addition, the value of this option is used to define grouping by resources in the scheduler.
fieldExpr
Use this option to declare how to call an appointment field to specify a resource of this kind. In addition, the value of this option is used to define grouping by resources in the scheduler.
label
Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind.
mainColor
Use the useColorAsDefault property instead.
Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned.
valueExpr
Specifies the resource object field that is used as a value of the Resource editor in the Appointment popup window.
To allow end users to choose a required resource for an appointment, there is a field in the Appointment popup window. This field's label is specified by the label field of the resource kind object. The editor that is used to select a resource depends on the value of the allowMultiple field. The TagBox widget is used when multiple selection is possible. The SelectBox widget is used when a single resource can be selected only. Both these widgets have the displayExpr and valueExpr options for specifying the displayed text and actual value of the selected item. These options are set to the displayExpr and valueExpr field values of the resource kind object, respectively.
If you have technical questions, please create a support ticket in the DevExpress Support Center.