Hello
I would like to change the fill color on appointments depending on certain criteria when the form containing the calendar object is loaded, basically the same as was listed in this post:
http://mindfusion.org/cgi/Forum/YaBB.pl?board=calnet_disc;action=display;num=117...I tried the suggestions that were made in the post listed above but without any luck...
I'm using the calendar with the single month view, and here is the code that is running on the form_load event:
Dim cmd As SqlCommand
Dim conn As SqlConnection
Dim dr As SqlDataReader
Dim app As Appointment
conn = New SqlConnection("server=rhdb4;database=calendarTest;trusted_connection=true")
conn.Open()
cmd = New SqlCommand("SELECT * FROM dbo.tblAppointment", conn)
dr = cmd.ExecuteReader
While (dr.Read)
app = New Appointment
app.StartTime = dr("appStartTime")
app.EndTime = dr("appEndTime")
app.DescriptionText = dr("appDescriptionText")
app.Subject = dr("appSubject")
app.Id = dr("ScheduleID")
'***here is where I would like to set the fill color
If dr("appSubject") = "test" Then
'app.Style.FillColor = Black
app.Style.HeaderBrush = New MindFusion.Drawing.SolidBrush(Color.Black)
MsgBox("test")
app.Style.BorderTopColor = Yellow
Else
app.Style.BorderTopColor = Black
End If
calendar.Schedule.Items.Add(app)
End While
The border colors change no problem, but the header fill color nevers does...I've checked through the properties for the calendar and tried changing a few values but cannot get it to work properly...
Thanks for any further suggestions