Hello
I am trying to set different colors for specific days (only using MonthView) in the Scheduler based on some variables.
I am handling the TimeSlotCreated event:
Protected
Sub
calendar_TimeSlotCreated(sender
As
Object
, e
As
TimeSlotCreatedEventArgs)
Handles
calendar.TimeSlotCreated
If
ScheduleDates.Contains(e.TimeSlot.Start)
Then
e.TimeSlot.CssClass =
"lightSalmon"
End
If
End
Sub
I have another user control which is a dropdownlist of employees. When the dropdownlist fires the changed event, I populate a variable stored in ViewState with the dates that the employee is working. As I understand, the TimeSlotCreated event fires after the Page Load event, but before my other user control event fires. I need to change the colors of the days after my user control fires. I implemented a not-so-great solution, by calling the RadAjaxPanel to reload after the user control event fires.
Private
Sub
DDLEmployee_Changed(sender
As
Object
, e
As
EventArgs)
Handles
DDLEmployee.EmployeeChanged
PopulateSchedule()
RadAjaxPanel1.ResponseScripts.Add(
String
.Format(
"$find('{0}').ajaxRequest();"
, RadAjaxPanel1.ClientID))
End
Sub
The problem is that the RadAjaxPanel load fires twice so it looks like it's flickering. Is there any way to change the colors of days after any other events have fired?