We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

repopulate scheduler with changed resource groups

This article shows how to change the data source for the appointments: https://www.syncfusion.com/kb/2706/how-to-bind-the-data-to-the-schedule-control-through-the-ajax-call
But I'm using resource groups end those change as well. However I cant update the resource dataSource with similar code. This is what I tried:

$("#BookingOverview").ejSchedule("option", "resources.resourceSettings.dataSource", data.companies); // While this is an array I still get Invalid input for property :resources - Expected type - array

How can I update both appointments and resources?

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team March 15, 2017 07:16 AM UTC

Thank you for contacting Syncfusion support.   
We have prepared the sample to dynamically load the resource group by using ajax post which can be download from the below location.   
Kindly refer the below code example used in the sample.   
                type: "POST", 
                url: "/Schedule/Resgroup", 
                data: { name: args.model.text }, 
                dataType: "json", 
                success: function (result) { 
                        group: { 
                            resources: ["Rooms", "Owners"] 
                        resources: [ 
                            field: "roomId", 
                            title: "Room", 
                            name: "Rooms", allowMultiple: false, 
                            resourceSettings: { 
                                dataSource: result.rooms, // assigning the data source from controller 
                                text: "text", id: "id", color: "color" 
                        }, { 
                            field: "ownerId", 
                            title: "Owner", 
                            name: "Owners", allowMultiple: true, 
                            resourceSettings: { 
                                dataSource: result.owners, // assigning the data source from controller 
                                text: "resText", id: "resId", groupId: "groupid", color: "rescolor" 

Live Chat Icon For mobile
Up arrow icon