This is a migrated thread and some comments may be shown as answers.

Appointments.Clear() method not working

1 Answer 174 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dexter McCloud
Top achievements
Rank 1
Dexter McCloud asked on 14 Apr 2010, 02:17 PM
I have a database that contains may appointments.  I have written a search page that allows a user to specifiy dates and other parameters.  Once the user initiates the search, I retrieve the appointments from the database and bind them to the radScheduler.  That part is is working fine.

However, whenever the user hits the search button, I need to clear all the previously bound appointments from the scheduler so I can put the new results from the database into the scheduler.  So, I called the Appointments.Clear() method but after a couple of seconds, it causes a javascript error.  I thought that maybe I need to set some other properties like AllowDelete=true but nothing seems to help.

Here's is the offending line (I think):

rsScheduler.AllowDelete = true;
rsScheduler.Appointments.Clear();

rsScheduler.AllowDelete = true;  
rsScheduler.Appointments.Clear(); 
If this is NOT the correct way to remove all the appointments from the scheduler, please provide me with alternatives.

Thanks,

Dexter

1 Answer, 1 is accepted

Sort by
0
Dexter McCloud
Top achievements
Rank 1
answered on 14 Apr 2010, 02:27 PM
Just found the answer.  The call to Appointment.Clear() is working.  I just needed to call Rebind() immediately afterwards.
Tags
Scheduler
Asked by
Dexter McCloud
Top achievements
Rank 1
Answers by
Dexter McCloud
Top achievements
Rank 1
Share this question
or