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

How to change kendo ui scheduler event color programmatically

5 Answers 2085 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lilan
Top achievements
Rank 2
Lilan asked on 29 Apr 2015, 10:10 AM

Hi, I want to change kendo ui scheduler event color programmatically based on a logic. please find the sample implementation in below. 

http://dojo.telerik.com/@lilan123/UPuDE/4

 

What I want is when I click on create button I want to add events and every event should have a different color. i tried to create the event as below adding color option but it doesn't work that way. 

 //Code 

attendees: '1',
start: new Date("2015/6/8"),
end: new Date("2015/6/8"),
title: "Off Day",
isAllDay: true,
color:'#0055A7'

Thanks 

Lilan

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 01 May 2015, 06:15 AM
Hello Lilan,

One possible solution is to apply the background color to the appointment as for example it is explained in this help topic

Hope this will help you solve the issue.

Regards,
Plamen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Lilan
Top achievements
Rank 2
answered on 05 May 2015, 03:12 AM

Hi Plamen,

This solved my issue, 

http://dojo.telerik.com/@lilan123/AJuqa

Thanks a lot.

Regards, 

Lilan

 

0
Bill
Top achievements
Rank 1
answered on 22 May 2018, 10:19 PM
@Plamen the help topic code does not work for events shown on a view that are created from a recurrence. The logic loops events and there is 1 event for the recurrence but there may be several rendered events with their own uid's in the view generated from it... how can we tap into those dynamically generated events using the recurrence event when the scheduler is databound?
0
Plamen
Telerik team
answered on 23 May 2018, 09:39 AM
Hello,

You can use dataItems collection of events as for example it is done in this dojo.

Regards,
Plamen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Bill
Top achievements
Rank 1
answered on 23 May 2018, 03:04 PM
Thank you @Plamen - using the dataItems collection worked like a charm.
Tags
General Discussions
Asked by
Lilan
Top achievements
Rank 2
Answers by
Plamen
Telerik team
Lilan
Top achievements
Rank 2
Bill
Top achievements
Rank 1
Share this question
or