Hi, I've been using the WebMonthView control to display appointments, but I was wondering if there is a way to change the colors of different appointments, say I have "Local Show" which lasts 3 days and I want it to appear green, but I have "Client Exhibition" which lasts 3 days and I want it to appear blue. is there anyway I can get this to work? I've tried all the different styles but it seems like the answer could be in code-behind... any help would be great.
I found the solution ..
protected void WebScheduleInfo1_DataBinding(Object sender, System.EventArgs
e)
{
AppointmentsSubsetCollection appCol = new AppointmentsSubsetCollection
(WebScheduleInfo1);
foreach (Infragistics.WebUI.WebSchedule.Appointment app in this
.WebMonthView1.WebScheduleInfo.Appointments)
if(app.Description=="CUS"
)
app.Style.ForeColor = System.Drawing.
ColorTranslator.FromHtml("#404040"
);
}
I have tried to implement it using the code shown below:
{AppointmentsSubsetCollection appCol = new AppointmentsSubsetCollection
{appCol = WebScheduleInfo1.GetAppointmentsForDate(WebScheduleInfo1.ActiveResource , app.StartDateTimeUtc);
if (appCol != null
foreach (Infragistics.WebUI.WebSchedule.Appointment appt in
appCol)
{appt.Style.ForeColor = System.Drawing.
But The appCol is always null and hence doesnt make a diff.. Any Help on this as soon as possible Is much appreciated ..
Thanks
Hello Valerie,
I'm using License Product of Infragistics and facing the problem in giving different colors to different appointments. I have used the lines of code suggested by you in code behind but no use...
Appointments which are assigned to one resource are having same color, i need different colors for appointments which are assigned to one resource.
Please do let help me out.
Thanks,
Mazin
I've been a little busy with work, I'll have a look into it when I get a chance but thanks very much, hopefully it will work.
Hello,
Were you able to change the colors of the appointments?
Valerie