This is a migrated thread and some comments may be shown as answers.

Scheduler - 3 Resource groups + Task Color

3 Answers 59 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 11 Feb 2016, 05:03 PM

Kendo UI version: 2016.1.112

 

I have a scheduler (using AngularJS), within it, I have 3 resource groups:

 

  • Task Type
  • Employee
  • Store

Task Type has a data source with the colour (sample later) and the other two data sources do not. If I comment out those other two data sources in resources then the background color of task type appears correctly. If I uncomment employee and store groups again then I lose the Task Type color again. 

 

 

01.resources: [
02.    {
03.        title: "Task",
04.        field: "TaskType",
05.        dataSource: [
06.            {
07.                text: "Normal Shift",
08.                value: "Shift",
09.                color: "#337ab7"
10.            },
11.            {
12.                text: "Need cover",
13.                value: "Need cover",
14.                color: "#d9534f"
15.            },
16.            {
17.                text: "Covering Shift",
18.                value: "Covering Shift",
19.                color: "#d9edf7"
20.            },
21.            {
22.                text: "Unplanned leave",
23.                value: "Unplanned",
24.                color: "#f2dede"
25.            },
26.            {
27.                text: "Planned leave",
28.                value: "Planned leave",
29.                color: "#fcf8e3"
30.            }
31.        ]
32.    },
33.    {
34.        field: "EmployeeId",
35.        dataTextField: "ShortName",
36.        dataValueField: "Id",
37.        title: "Emplyoee",
38.        dataSource: [
39.            data.employee
40.        ]
41.    },
42.    {
43.        title: "Store",
44.        field: "AndromedaSiteId",
45.        dataSource: data.stores,
46.        dataValueField: "AndromedaSiteId",
47.        dataTextField: "Name"
48.    }
49.]

 

 

The task data is all correct. Value fields are selected correctly in the model... but I really want that color from task type (without forcing it through myself preferably, or commenting out the other two resources). 

Any ideas? 

 

Best Regards,

Matt

3 Answers, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 11 Feb 2016, 06:00 PM

Ok self ... if I move the task resource type to the top of the resource types it picks it up correctly. 

This will probably do ... 

But is there a way to choose which resource type is selected for the color rather than the position in the array?

0
Accepted
Vladimir Iliev
Telerik team
answered on 15 Feb 2016, 11:32 AM
Hi Matt,

Currently there is no other way of selecting which resource color to be used other than placing it in the first place of the array. You can however share your idea at Kendo UI UserVoice to allow other users vote for it. Most voted ideas are included in next Kendo UI releases. 

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Matt
Top achievements
Rank 1
answered on 15 Feb 2016, 04:44 PM

Thanks. Added. :) 

 

Tags
Scheduler
Asked by
Matt
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or