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
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
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.
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
can i set appointment color by using RGB code
0
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:
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.
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
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:
Best
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