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

Change Appointments back color

6 Answers 378 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Tiago
Top achievements
Rank 2
Tiago asked on 15 Oct 2009, 02:52 PM
Dear friends,

I have a read only RadScheduler, and i need to change the backcolor of it when i have text in one those fields.
For example, the default backcolor is blue, but when one of the dataset fields contains some text, i need to change the backcolor to red.

Thank you.

6 Answers, 1 is accepted

Sort by
0
Tiago
Top achievements
Rank 2
answered on 15 Oct 2009, 03:16 PM
Dear friends,

I found a very simple solution.

Using the BackgroundId you can easily change the appointments backcolor.

For example:
appointmentMappingInfo.BackgroundId = "state";
You can add the field state(int) with the correspondent number ... i found that the number 2 is the red, 11 is yellow and 4 is green!

Good luck to you all!!
0
Accepted
Boyko Markov
Telerik team
answered on 21 Oct 2009, 08:26 AM
Hi Tiago Pinho,

If you want to change appointment background, you can use the Background and BackgroundID properties. The background property points to the AppointmentBackground enumeration with values such as Personal, Business, None, PhoneCall. Every value in the AppointmentBackground has a different color representation for the appointments.

I hope this helps.

All the best,
Boyko Markov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
shinu rag
Top achievements
Rank 1
answered on 02 Apr 2010, 06:22 AM
Hi Boyko..
can i set appointment color by using RGB code
0
Dobry Zranchev
Telerik team
answered on 07 Apr 2010, 02:41 PM
Hello shinu rag,

Thank you for writing.
 
Unfortunately, we do not have way to add custom Background, but you could replace some of the existing background colors. The following code snippet represents how to implement it:
 
AppointmentBackgroundInfo appointmentBackgroundInfoOld = this.radScheduler1.Backgrounds[5] as AppointmentBackgroundInfo;
AppointmentBackgroundInfo appointmentBackgroundInfoNew = new AppointmentBackgroundInfo(appointmentBackgroundInfoOld.Id, appointmentBackgroundInfoOld.DisplayName, Color.Cyan);
this.radScheduler1.Backgrounds[5] = appointmentBackgroundInfoNew;
 
The existing background Ids are between 1 and 11.

If you have additional question feel free to ask.

Sincerely yours,
Dobry Zranchev
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Xavier Soares
Top achievements
Rank 2
answered on 05 Jan 2011, 11:47 AM
Hello,

Using the above code, the font color is also changed to background color.

Is it possible to change the background color and keep the text/details font color of the appointment or even change it to a new one? For instance change background color to black and text color to white.

Best regards


0
Xavier Soares
Top achievements
Rank 2
answered on 05 Jan 2011, 12:39 PM
Solved! Just added a few lines of code:

Dim AtrasadoInfoOld As AppointmentBackgroundInfo = TryCast(Me.RadScheduler1.Backgrounds(6), AppointmentBackgroundInfo)
Dim AtrasadoInfoNew As New AppointmentBackgroundInfo(AtrasadoInfoOld.Id, AtrasadoInfoOld.DisplayName, Color.Yellow)
AtrasadoInfoNew.ForeColor = Color.Black
AtrasadoInfoNew.BackColor = Color.Yellow
AtrasadoInfoNew.BackColor2 = Color.Yellow
Me.RadScheduler1.Backgrounds(6) = AtrasadoInfoNew


Best
Tags
Scheduler and Reminder
Asked by
Tiago
Top achievements
Rank 2
Answers by
Tiago
Top achievements
Rank 2
Boyko Markov
Telerik team
shinu rag
Top achievements
Rank 1
Dobry Zranchev
Telerik team
Xavier Soares
Top achievements
Rank 2
Share this question
or