DevExtreme jQuery/JS - Group Appointments by Resources
To group appointments by resources, assign an array to the groups option. Each element of this array is fieldExpr of a resource kind. Note that the order of resource headers depends on the order of resources in the resources array.
JavaScript
- var appointments = [{
- roomId: 1,
- teacherId: 2,
- text: "Meeting",
- // ...
- },
- // ...
- ];
- var resources = [
- { fieldExpr: 'roomId', dataSource: roomsDataSource },
- { fieldExpr: 'teacherId', dataSource: teachersDataSource }
- ];
- $(function(){
- $("#schedulerContainer").dxScheduler({
- dataSource: appointments,
- resources: resources,
- // Groups appointments by rooms and by teachers
- groups: ['roomId', 'teacherId']
- //...
- });
- });
See Also
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.