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

Setting an Appointment's TextColor doesn't appear to work.

2 Answers 20 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 29 Sep 2011, 05:43 PM
Have a look at the clipboard1.gif.

You'll see that there is a treeview and a scheduler. Now, the nodes in the treeview are coloured for the claendar they represent and the appointments in the scheduler are supposed to coloured for the calendars that are associated with.

However, I'm sure that you'll note that whilst, for the greater part, the appointments have been correctly coloured in the background, the text colour is always black.

FYI, I'm using the following bit of code in the AppointmentDataBound event for colouring the appointment ...

e.Appointment.BackColor = ColorTranslator.FromHtml(calEvent.BackColour);
e.Appointment.ForeColor = ColorTranslator.FromHtml(calEvent.TextColour);

No, I know that the code is working 'cos I can see that it's been set using the IE developer tools, but the inline style is being overridden.

Clipboard2.gif shows the output from the IE developer tools that cearly show that the appointment's text colour is being overriden by the .rsAptContent class.

Obviously, I need to override this, but it strikes me as wrong that there should be something with a higher priority than setting the colour in the code-behind as I am doing.

--
Stuart

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 04 Oct 2011, 04:13 PM
Hi Stuart,

Thank you for reporting this issue. It seems like a bug in the Black skin(may be some other as well). I've logged it for fixing.

All the best,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Chris
Top achievements
Rank 1
answered on 19 Nov 2018, 02:35 PM

This post is quite old, but maybe this helps someone else.  In order to prevent rsAptContent from applying the color, I use this CSS to get the color from the parent.

 div .rsAptContent {
            color: inherit !important;
        }

Tags
Scheduler
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Plamen
Telerik team
Chris
Top achievements
Rank 1
Share this question
or