Background color based on custom field

3 posts, 1 answers
  1. Smiljan
    Smiljan avatar
    8 posts
    Member since:
    Mar 2015

    Posted 01 Apr 2015 Link to this post

    Hi!

    Is there a possibility to set background color based on the custom field in Appointments table (let's say in "AppointmentFormatting" event)?

    TNX and BR,
    Smiljan
  2. Answer
    Dess
    Admin
    Dess avatar
    1609 posts

    Posted 01 Apr 2015 Link to this post

    Hello Smiljan,

    Thank you for writing.

    Please refer to our Formatting appointments help article which demonstrates how to style the AppointmentElements. In the event handler you have access to the Appointment via the SchedulerAppointmentEventArgs. You should cast the SchedulerAppointmentEventArgs.Appointment to your custom class, extract the custom field and apply the desired style to the SchedulerAppointmentEventArgs.AppointmentElement.

    I hope this information helps. Should you have further questions, I would be glad to help.
     
    Regards,
    Dess
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Smiljan
    Smiljan avatar
    8 posts
    Member since:
    Mar 2015

    Posted 03 Apr 2015 in reply to Dess Link to this post

    Great!

    Did the trick :)

    Thank you and BR,
    Smiljan
Back to Top