Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1650
Customizing the Dayview
posted

I need to provide a solution that displays 'Time Logs' to my end user in the UltraDayView control. A In my case a Time Log consist of a startdate, enddate, subject and description. So getting a data set is not an issue. I would like to be able to conditionally alter the appearance of the items based on a value within the dataset. For instance, I need to color items that have been accepted, a shade of green, also displaying a image next to the subject. If an item has been rejected, it should be a shade of red, displaying a different image. All other items will be of a a standard color, with no image.

  • 5118
    posted

    Hi,

    You can set the Appointment.Appearance.BackColor = Color.Green or Red once you determine if it has been accepted or not.  You can do this in the UltraCalendarInfo.AfterAppointmentAdded event handler if you are not manually creating the appointments. 

    As far as the image goes you'll have to use a CreationFilter to stick an ImageUIElement in the AppointmentUIElement.ChildElements collection and adjust the rectangles for the children to avoid overlap.