Scheduler - 3 Resource groups + Task Color

4 posts, 1 answers
  1. Matt
    Matt avatar
    43 posts
    Member since:
    May 2013

    Posted 11 Feb Link to this post

    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

  2. Matt
    Matt avatar
    43 posts
    Member since:
    May 2013

    Posted 11 Feb in reply to Matt Link to this post

    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?

  3. Kendo UI is VS 2017 Ready
  4. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 15 Feb Link to this post

    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!
     
  5. Matt
    Matt avatar
    43 posts
    Member since:
    May 2013

    Posted 15 Feb in reply to Vladimir Iliev Link to this post

    Thanks. Added. :) 

     

Back to Top
Kendo UI is VS 2017 Ready