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.

How to assign data to resourceSettings: dataSource:

Thread ID:

Created:

Updated:

Platform:

Replies:

124421 Jun 8,2016 12:13 PM Jun 10,2016 01:10 AM JavaScript 3
loading
Tags: ejSchedule
Morgan
Asked On June 8, 2016 12:13 PM

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 02:31 AM

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 04:30 AM

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 01:10 AM

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.

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.

;