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

task color from color picker

6 Answers 91 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 06 Oct 2015, 12:32 AM

Hello,

 I am utilizing the scheduler via MVVM in my application. The application is set up so that on databound, a left column displays all users that have events in the scheduler. For each user listed in the column, there is a kendo color picker. The right hand side has the scheduler. 

I would like to have the users in the left column chose a color from the picker and set it so that all of the events that they own in the scheduler (on the rightside) will utilize the chosen color. 

I am a little confused on the best way to go about this. Please advise.

6 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 07 Oct 2015, 01:05 PM
Hello George,

Updating the resources colors depends on how you load them - for example if they are static data on the client side you can use the following approach to update them:

If the resources are loaded using remote binding than you can simply call the "read" method of the corresponding resource.

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
Tony
Top achievements
Rank 1
answered on 07 Oct 2015, 05:26 PM

Hi Vladimir,

Unfortunately this does not quite seem to tackle what i need to accomplish. I have a list of users being loaded dynamically outside of the scheduler via json file. When a person is selected I need to display their events in the scheduler. Additionally, each person has a colorpicker associated with their record. I ​need the colorpicker to dynamically change the color of the events associated with the person within the scheduler. Very much like using google calendar. 

 Please advise.

0
Vladimir Iliev
Telerik team
answered on 09 Oct 2015, 08:56 AM
Hi George,

Actually the example that I provided shows how to edit the resources (users) properties using the dataSource and it's model API. Yon can further customize the example to do this using separate controls outside the Scheduler (custom solution). Another option is to include the ability of editing these resources directly in the editor template of the Scheduler as demonstrated in the following demo:


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
Tony
Top achievements
Rank 1
answered on 10 Oct 2015, 12:44 AM

Hey Vladimir,

I see what you mean. However, I noticed that you bound the resources using the data-resources attribute. Is there a way to use the data-resources attribute to point to a property in my view model containing an object composing of what would be the resources? I would assume once those items are in my view model I can pass data into them to update the event color.

0
Tony
Top achievements
Rank 1
answered on 12 Oct 2015, 10:11 PM
Also, I noticed a lot of examples i'm seeing are using static data for the resources. Is there a way to make it more dynamic? 
0
Vladimir Iliev
Telerik team
answered on 13 Oct 2015, 09:07 AM
Hello,

Please check the answers of your questions below:

1) Is there a way to use the data-resources attribute to point to a property in my view model containing an object composing of what would be the resources - There is no build-in resource binding, however you can implement one using custom binding.

2) Also, I noticed a lot of examples i'm seeing are using static data for the resources. Is there a way to make it more dynamic? - Loading the resources from remote service is already shown in the example linked in my previous reply.

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
Tony
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Tony
Top achievements
Rank 1
Share this question
or