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;
}
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;
}