Hi There
I'm having some trouble with the order of events for the Cell Format
We do some conditional cell formatting based on values returned from a database, such as what days to block - holidays etc
I managed to get it to work fine the first time round
The issue arises on the following Navigator events
How can I call a refresh of the data method and which event should it go in
As putting the values in the Navigate events makes the cellformating event use the previous
range of exception times for the previous date range as defined before the navigate event.
Below is some example code
I'm having some trouble with the order of events for the Cell Format
We do some conditional cell formatting based on values returned from a database, such as what days to block - holidays etc
I managed to get it to work fine the first time round
The issue arises on the following Navigator events
- NavigateBackwardsClick
- NavigateForwadsClick
- Scheduler.CellFormating
How can I call a refresh of the data method and which event should it go in
- exceptionTimes = _service.GetSchedulerExceptionTimesByDateRange(RangeStartDate, RangeEndDate)
As putting the values in the Navigate events makes the cellformating event use the previous
range of exception times for the previous date range as defined before the navigate event.
Below is some example code
Private
Sub
snMain_NavigateBackwardsClick(sender
As
Object
, e
As
EventArgs)
Handles
snMainNav.NavigateBackwardsClick
RangeStartDate = rsScheduler.ActiveView.StartDate.AddDays(-1)
RangeEndDate = rsScheduler.ActiveView.EndDate.AddDays(1)
exceptionTimes = GetSchedulerExceptionTimesByDateRange(, RangeStartDate, RangeEndDate)
GetAppointmentsByDateRange()
End
Sub
Private
Sub
rsScheduler_CellFormatting(sender
As
Object
, e
As
SchedulerCellEventArgs)
Handles
rsScheduler.CellFormatting
' Other Code
For
Each
Exception
In
exceptionTimes
'Block etc
Next
End
Sub