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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to assign data to resourceSettings: dataSource:

Thread ID:

Created:

Updated:

Platform:

Replies:

124421 Jun 8,2016 04:13 PM UTC Jun 10,2016 05:10 AM UTC JavaScript 3
loading
Tags: ejSchedule
Morgan
Asked On June 8, 2016 04:13 PM UTC

I have a test project at http://jsplayground.syncfusion.com/1bbis2ae

I want to set
resourceSettings: { 
datasource: resourceData,
text: "text",
id: "id",
groupId: "groupId",
color: "color"
}
where resourceData is as follows:

          var resourceData = [
{ text: "Nancy", id: 1, groupId: 1, color: "#f8a398" },
{ text: "Steven", id: 3, groupId: 2, color: "#56ca85" },
{ text: "Mary", id: 13, groupId: 2, color: "blue" },
{ text: "Joe", id: 15, groupId: 2, color: "red" },
{ text: "Michael", id: 5, groupId: 1, color: "#51a0ed" }
            ];


The above code will not work. However, if I use the this code the data is displayed:
resourceSettings: { 
                        dataSource: [
{ text: "Nancy", id: 1, groupId: 1, color: "#f8a398" },
{ text: "Steven", id: 3, groupId: 2, color: "#56ca85" },
{ text: "Mary", id: 13, groupId: 2, color: "blue" },
{ text: "Joe", id: 15, groupId: 2, color: "red" },
{ text: "Michael", id: 5, groupId: 1, color: "#51a0ed" }
],
                        text: "text",
id: "id",
groupId: "groupId",
color: "color"
}

Am I missing something? 





Karthigeyan Krishnamurthi [Syncfusion]
Replied On June 9, 2016 06:31 AM UTC

Hi Morgan,   
   
Thank you for contacting Syncfusion support.   
   
In the provided sample,” dataSource” is declared as “datasource” (S in small case) with-in the “resourceSettings” collection which is the cause for the issue. We have modified the provided sample which can be viewed from the below link:    
   
Please let us know if you need any further assistance.   
   
Regards,   
Karthigeyan   
 


Morgan
Replied On June 9, 2016 08:30 AM UTC

Well spotted.

I could have been looking at that for years and not noticed the difference between 'datasource' and 'dataSource'.

Typing errors like that could be common in the future, but checking the spelling will be my first thing I will do if I am having a problem with code.

Thanks for your help


Morgan

Karthigeyan Krishnamurthi [Syncfusion]
Replied On June 10, 2016 05:10 AM UTC

Hi Morgan, 
 
We are happy to hear that your issue has been resolved. 
 
Please let us know if you need any further assistance. 
 
Regards 
Karthigeyan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;