I've checked our code and we're using ClearSchedule method.
We also have Schedule.Redraw(1) but only in 1 case (when we display schedule for all instructors).
>Hi all.
>
>After the schedule has been populated, I am trying to re-populated it. I tried using this code:
>
>*** Clear the time bars just in case the user selected a new start date
>*** Or Checks one of the boxes that says "View this event only" etc.
>*** The documentation says that the following should work, but in practice
>*** it does not - the call to ClearTimeBars() returns true, but they remain
>*** visible in the scheduler, so get out the sledge hammer
>*!* FOR lnI = 1 TO toScheduleObject.ListCount
>*!* toScheduleObject.ClearTimeBars(lnI)
>*!* ENDFOR
>toScheduleObject.ClearSchedule()
>
>As you can see from my comments, ClearTimeBars() did not actually remove them from the display. ClearSchedule() did indeed clear the schedule, but when I re-added the time bars, the time bars associated with the previous first list item were still being displayed.
>
>Note: the list item that was #2 became list item #1 after re-populating the control.
>
>How do I get the time bars that I don't want to see anymore actually go away?
>
>The code did not throw any errors and the ClearTimeBars() method returned true, but the TimeBars never went away.
If it's not broken, fix it until it is.
My Blog