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

[Solved] AppointmentCreate e.Appointment.CssClass issue

2 Answers 187 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Tronn Carson
Top achievements
Rank 1
Tronn Carson asked on 24 Jul 2007, 11:20 AM
I'm using the scheduler and want color coding.  I'm using the datasource property in webpart so I did not think I could use ResourceTypes.  So instead the webpart allows the user to set a field, a value for that field, and cssclass to use if that value is found while in AppointmentCreated.

The CSS class is changed in the page, but apparently is overridden by subsequent divs.  I also tried changing background color and border using e.Appointment but likewise that does not work. 

I was thinking I might be able to use Resources instead of ResourceTypes?  Is there an example for this?

Thanks,

T

void scheduler_AppointmentCreated(object sender, SchedulerEventArgs e)
        {
           
            string status = dt.Rows[DataRowCount][this._ResourceField].ToString();
            string Title = dt.Rows[DataRowCount]["Title"].ToString();
            if (ResourceCSSById.ContainsKey(status))
            {
                string cssclass = this.ResourceCSSById[status];
                e.Appointment.CssClass = cssclass;
            }
            else
            {
                e.Appointment.CssClass = _ResourceDefaultCSSClasses;
            }
        }

CSS:

.Approved
{
    border-bottom-style:dashed !important;
    border-bottom-color:navy;   
}
.Rejected
{
    border-bottom-style:solid !important;
    background-color:Maroon;
    border-bottom-color:Gray;   
}
.Pending
{
    border-bottom-style:dashed !important;
    background-color:Lime;
    border-bottom-color:Fuchsia;   
}

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 24 Jul 2007, 02:42 PM
Hi Tronn,

Your selectors should be a bit more specific and include the skin name and rsTaskWrap:
.RadScheduler_Default .Approved .rsTaskWrap 
    border-bottom-style:dashed !important; 
    border-bottom-color:navy;    

Also, "!important" might not be needed in this case.

Let us know if this helps.

Kind regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Tronn Carson
Top achievements
Rank 1
answered on 24 Jul 2007, 04:40 PM
Excellent!  Thanks so much for your quick reply.  This pretty much fit my needs:

.RadScheduler_Default .Pending .rsAptWrap

Thanks again!


Tags
Scheduler
Asked by
Tronn Carson
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Tronn Carson
Top achievements
Rank 1
Share this question
or