We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Filtering Appointments

Hi,
I am trying to implement a filtering functionality i.e. to show only certain type of appointments. For this I tried to reset the MasterList property of the Data Provider but it is not working and still shows all the appointments.
Please let me know how I can achieve this.

Thanks and Regards,
Vijayant.


4 Replies

AD Administrator Syncfusion Team September 28, 2008 09:02 PM UTC

After changing the contents of your MasterList, try calling:

scheduleControl1.GetScheduleHost().SwitchTo(desiredViewType, true);

to see if this will force your new data to display properly.



AD Administrator Syncfusion Team September 30, 2008 10:07 AM UTC

Hi Clay,

Thanks a lot for your response. I am now able to filter the appointments. However I am getting an exception "Argument out of range" exception. This occurs mostly in the week mode.

I am attaching the screen-shot, please provide some inputs on this.

Thanks and Regards,
Vijayant Rao.



Screenshot_f404d40f.zip


AD Administrator Syncfusion Team September 30, 2008 11:45 AM UTC

The picture shows big red cells with Exception in the upper right corner. This red cell is seen when the embedded GridControl encounters soome kind of error when it tries to draw the cell.

The call stack you show suggests it is flagging a different error that occurs when the schedulecontrol is doing hittesting on mouse moves.

I suspect these 2 different errors are related and have to do with the data in the MasterList. After you change the MasterList, are you calling MasterList.SortStartTime() to make sure the appointments in the list are ordered as expected by the ScheduleControl?



AD Administrator Syncfusion Team October 8, 2008 08:53 AM UTC

Hi Clay,
I am calling the SortStartTime method after resetting. This works fine when I am in the Month mode. but when I shift to the Week mode I am getting the same error.

I am also getting this error in another scenario. I am trying to implement a coloring functionality, i.e. to color the appointments based on some custom attributes. For this I am creating an ILookUpObjectList object and overriding the GetLabels method in the Data Provider to return this object.
When I set the coloring attribute to none it works fine but if I set the attribute to something else I get the error I mentioned.

Please let me know if I am using the correct approach for coloring the appointments.

Thanks and Regards.
Vijayant.



Loader.
Live Chat Icon For mobile
Up arrow icon