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

Back/Forecolor in Appointments

8 Answers 188 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Martin Gartmann
Top achievements
Rank 2
Martin Gartmann asked on 10 Feb 2008, 10:16 PM

Hello,

i want to allow that the user of a schedule system may select there own color-combinations for there appointments. When i use CSS cooded by hand it is working, but because i have no idear how many users will register for this calender, i store the background/forecolor in there user Profile. It may come 120 User total, so i don't want the change the CSS and

select
case
statement


all the time

When i just set these color during appointment creating like

e.Appointment.BackColor = System.Drawing.ColorTranslator.FromHtml(rw(

"backcolor"))e.Appointment.ForeColor = System.Drawing.ColorTranslator.FromHtml(rw("fontcolor"))

the colors are correct but i have a background-grafik overlap at the upper border of my appoinment. i guess this is cooming from the oroginal (in my Case Office2007) skin i am using.

This is not the case when i used hard cooded CSS with no background-image defined, then the grafik is gone.

What must i do to remove the grafik, when i set the colors by code behind.

Kind Regards

Martin Gartmann

8 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 11 Feb 2008, 05:29 PM
Hello Martin,

Please, refer to the topic on how to Set different styles for appointments. If you have any questions, please fee free to ask us.

Kind regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Martin Gartmann
Top achievements
Rank 2
answered on 11 Feb 2008, 07:06 PM
Hello Peter,
this was exactly what i was using with success.

Because i have a undefined number of users i want that they are able to choose there own colors, instead of selecting one of number of  preset CSS Style.

If i set appointment fore/backcolor i can nearly archive this, but the standard background-image is still there !!

you can see it live at http://www.tdisdi.de/event/default.aspx

I simply want to remove the Standard background grafic from the office 2007 Style.

Have a good time

Martin
0
Peter
Telerik team
answered on 12 Feb 2008, 09:56 AM
Hello Martin,

I got it. You can clear the default background image with the following selector:

.RadScheduler_Office2007 .rsWrap .rsApt .rsAptWrap      
    {     
      backgroundnone;     
    }  

Should you have further questions, please let us know.


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Susan
Top achievements
Rank 1
answered on 18 Feb 2008, 10:24 PM
I'm assuming this is in the .css? I thought with Prometheus, the css, images, etc for the skins were embedded in the dll's. Can you explain further where to put this code as I am needing the same thing.

Thanks, your support and documentation is great.
0
Martin Gartmann
Top achievements
Rank 2
answered on 19 Feb 2008, 07:38 AM
Dear susan,

The solution from Peter is working.

Simple place his code in a .css file and load it in your .aspx

It will overwrite the predifined background for your skin.

I have used this also in masterpage with success.

Kind regards

Martin Gartmann
0
Susan
Top achievements
Rank 1
answered on 19 Feb 2008, 12:47 PM
Sorry to be a pain, but I'm still trying to figure out Prometheus. With the old rad controls, you had a folder underneath your application titled 'RadControls', under that, the control and its associated skins. With Promethues, my understanding is that this is not true anymore. There is a 'scheduler.css'. Do I add the code below to this css? If so, where, underneath my application directory, does it belong so it will be seen? Does it contain JUST the code below, or do I need to keep what is in there and just add the code below?

Thanks again...
0
Alex Gyoshev
Telerik team
answered on 19 Feb 2008, 01:13 PM
Hi Susan,

It is true that the "Prometheus" RadControls contain the embedded CSS and images. This decision has been made to allow simple integration of RadControls with any project by simply adding the Telerik.Web.UI.dll to your project (and removing the /RadControls directory).

Nevertheless, it isn't necessary to add the styles, listed below, to the RadScheduler CSS file - you could simply add them to your page. There are two possible ways to do that:
  • adding a <style> block to your page, e.g.:
    <style type="text/css"
    .RadScheduler_Office2007 .rsWrap .rsApt .rsAptWrap       
    {      
        backgroundnone;      
    </style> 
  • adding an external stylesheet to the <head> of your page:
    <head> 
        [...] 
     
        <link rel="stylesheet" type="text/css" href="myStyles.css" /> 
     
        [...] 
    </head> 

    ... and creating a CSS file on your server, named myStyles.css, containing these lines:

    .RadScheduler_Office2007 .rsWrap .rsApt .rsAptWrap 
        backgroundnone
    }  
If these are the only styles that you want to add to your site, I recommend the first solution, as it won't create too much overhead. If you desire to write valid markup, you should add the <style> block to the <head> section of your page.

I hope that this information was useful enough. Let us know if further questions arise.
All the best,
Alexander
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Susan
Top achievements
Rank 1
answered on 19 Feb 2008, 07:46 PM
Works great. Thank you so much for the clarification.

Tags
Scheduler
Asked by
Martin Gartmann
Top achievements
Rank 2
Answers by
Peter
Telerik team
Martin Gartmann
Top achievements
Rank 2
Susan
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or