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

AppointmentBackgroundInfo

2 Answers 20 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 28 Mar 2018, 06:04 PM
I am working on a screen that uses the scheduler.  I only want to show the month view and place the different tasks on the calendar.  I have this working the main issue I am having is I would like to color the background based on our own internal status.  As of right now I have been able to use the AppointmentFormatting to change the colors and have it display the way I would like.  I also see that I could add AppointmentBackgroundInfo so for Status Id's that already exist are no issue.  Is there a way to override the existing status backcolor and gradientstyle?

2 Answers, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
answered on 29 Mar 2018, 05:42 PM
I think for what I am doing I have the best solution
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Apr 2018, 05:45 AM
Hello, Frank,   

The AppointmentBackgroundInfo controls the back color of the AppointmentElement. You can event create your own custom AppointmentBackgroundInfo. The following forum thread demonstrates how to create a custom AppointmentBackgroundInfo: https://www.telerik.com/forums/change-appointments-back-color

An alternative approach is to use the AppointmentFormatting event. It gives you the opportunity to fully customize the AppointmentElement.

Feel free to use this approach which suits your requirement best.

As to the appointment's status, you can hide it by setting the RadScheduler.ShowAppointmentStatus property to false. Thus, only the background will be rendered. Alternatively, you can add your custom status. Here is demonstrated a sample code snippet: 
AppointmentStatusInfo appointmentStatusInfo = new AppointmentStatusInfo((int)AppointmentStatus.Tentative,
    "Test", Color.Red,Color.Yellow, AppointmentStatusFillType.Hatch);
this.radScheduler1.Statuses.Add(appointmentStatusInfo);
this.radScheduler1.Statuses.RemoveAt(2);
 
a.StatusId = this.radScheduler1.Statuses.Last().Id;



I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
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.
Tags
Scheduler and Reminder
Asked by
Frank
Top achievements
Rank 1
Answers by
Frank
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or