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

Avoiding some resources coloring the task

7 Answers 148 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jesper Krejberg Petersen
Top achievements
Rank 2
Jesper Krejberg Petersen asked on 27 May 2014, 11:27 PM
Hi.

I have a task record with 3 resources.
The first, which I want to control the task color, can be null (unselected).
If that is the case, I want the task to be the default scheduler task color.

As the scheduler works now, if it does'nt find a color in the first reaource,  it seeks the color from the second and third resources.
How can I avoid that and yet have the colors show in the editor dropdownlist and multiselect ?
It would be nice with a .colorTask(false) configuration option for resources :)

Cheers /Jesper


7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 30 May 2014, 06:22 AM
Hi Jasper,

The scheduler won't color the event if the latter doesn't have the resource field set. If you want to have the default color applied you can try setting the color field of the resource to "auto". Then you will need a CSS rule to set the text of the event (otherwise it will be white):

    <style>
      .k-event {
        color: black;
      }
  </style>

Here is a live demo: http://trykendoui.telerik.com/@korchev/OqIY

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jesper Krejberg Petersen
Top achievements
Rank 2
answered on 21 Jun 2014, 04:53 PM
Hi. Thanks for your answer, and sorry for the very late reply here.

In your example there is only 1 resource (room).

I found out that the Reaources sample in the demos, http://demos.telerik.com/kendo-ui/scheduler/resources, shows my problem.

If I understand the demo right, it's the idea that the color of the events should reflect the meeting room.
This gives us the possible values og blue or pink, and a light blue if no room is choosen.

But if you don't choose a room and assign Charlie as an attendee, you get a green event in the scheduler, which is confusing/wrong.

This could of course be handled by not attaching colors to the attendees but that would be a "cheap" workaround :), since it is nice to have the attendee colors available in the edit window, and possible in a custom event/timeslot template.

I hope my problem is clearly described.

Cheers /Jesper


0
Atanas Korchev
Telerik team
answered on 25 Jun 2014, 07:27 AM
Hello Jasper,

Thank you for the clarification. Indeed the scheduler currently uses the color of the first resource of the event if such a color is defined. If this is not desired you need to avoid setting the color of the second level resources.

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jesper Krejberg Petersen
Top achievements
Rank 2
answered on 25 Jun 2014, 08:05 AM
Hi. Thank you.

I hope you will consider expanding this functionality, since the event color could (and does in my situation) be determined from many other sources, than the resources.

A simple ColorCode field in the "EventViewModel", would be perfect :)

Cheers /Jesper
0
Accepted
Vladimir Iliev
Telerik team
answered on 27 Jun 2014, 06:57 AM
Hi Jesper,

I would suggest to share your idea at Kendo UI UserVoice to allow other users can comment, evaluate and vote for it. We are very open minded and carefully listen to our community's feedback - that why most voted ideas are included in next KendoUI 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
Christian
Top achievements
Rank 1
answered on 01 Apr 2015, 02:33 PM
Hi Vladimir,
we also need this kind of feature setting the color differently from resource colors.

E.g. we have event-types. Meetings are green and vacations are red and so on.

And depending of the view (grouping) the user has chosen for the Scheduler, we would like to change the coloring-semantic as well.
Sometimes its the color of the resource, sometimes its the color of the event type. It depends on the usecase.

Where can I vote for this feature request?

kind regards
Christian
0
Vladimir Iliev
Telerik team
answered on 02 Apr 2015, 07:59 AM
Hi Jesper,

As I mention early you can share your idea at Kendo UI UserVoice - please check the link below:

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Jesper Krejberg Petersen
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Jesper Krejberg Petersen
Top achievements
Rank 2
Vladimir Iliev
Telerik team
Christian
Top achievements
Rank 1
Share this question
or