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

Can event title has one or more color to show

1 Answer 64 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
宏吉
Top achievements
Rank 1
宏吉 asked on 15 Feb 2019, 01:53 AM

Events maybe have some different types , I want if it has type 1 give it title one circle color , has type 2 give other color..... and so on

So maybe one event has multiple colors, how to do this?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 18 Feb 2019, 11:35 AM
Hello,

Perhaps the easiest option is to get the event HTML element when it is dataBound and to add a class to it, or otherwise change its appearance as needed. Here's an example of doing that: https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/appearance/modify-event-styling-on-databound (you don't have to use a custom template to do this).

Alternatively, you can define your own template for the appointments and use their data to define colors and/or CSS classes entirely in the template without using the .dataBound event: https://demos.telerik.com/kendo-ui/scheduler/templates.
Here are some more examples of similar changes: https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/appearance/set-event-color-in-the-template and https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/appearance/event-custom-background-color.

In case changing the background color is sufficient, you can do that through resources that you can associate events with: https://demos.telerik.com/kendo-ui/scheduler/resources.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler
Asked by
宏吉
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or