Resource Colors and Resource Groups

5 posts, 1 answers
  1. Chuck
    Chuck avatar
    10 posts
    Member since:
    Dec 2011

    Posted 30 Mar Link to this post

    Hi!

    In the Timeline Demo, it shows 2 rooms and 3 attendees. When the data is plotted, it shows the color of the rooms assigned in the Resource. Is it possible to display the color that is associated with the attendees instead?

     

    Chuck

  2. Chuck
    Chuck avatar
    10 posts
    Member since:
    Dec 2011

    Posted 30 Mar in reply to Chuck Link to this post

    I believe that I need to create a custom event template and change the color based on a value from my model. However, how do I set the color for the entire "k-event"? If I exaggerate the colors (just to illustrate), I get the following:
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Chuck
    Chuck avatar
    10 posts
    Member since:
    Dec 2011

    Posted 30 Mar in reply to Chuck Link to this post

    I meant to also attach my sample event template...
  5. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 01 Apr Link to this post

    Hi Chuck,

    Please note that modification of the base color of the events will require custom solution. For example you can use the "DataBound" event of the Scheduler to iterate over the available events and manually set it's background color. Another option is to create entirely custom view which to modify the base event template in order to show the color of the second resource (example of creating custom view). 

    Regards,
    Vladimir Iliev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Chuck
    Chuck avatar
    10 posts
    Member since:
    Dec 2011

    Posted 01 Apr in reply to Vladimir Iliev Link to this post

    Excellent.

    I created the custom Event Template (not as complex as the one shown), set the desired class, then used the Databound event to use some simple JQuery to add my class to the div with the k-event and remove it from my template. 

    Thanks!!

    Chuck

Back to Top
UI for ASP.NET MVC is VS 2017 Ready