Hi Guys,
i'm using the UltraDayView to show a calendar with appointments on it.
The problem is when i have a lot of appointments on the calendar and I add another one - A sort is being made and it takes a long time (something like 40sec-60sec).
The sort is being made every time i'm touching Appointments.All property, Appointments.GetEnumerator etc.
All of this is resulting in a really bad performance.
Is there anything that can be done in order to turn off the sorting? Why do we need to sort those appointments?
I'm using version 10.1
Thanks,
Ziv.
Hi Ziv,
Thank you for posting in our forums.
If the appointment collection has changed then when accessing it through the properties you have mentioned will indeed sort the collection. This is done, because the ordinal positions of the Appointment objects in the collection must coincide with their chronological order. Otherwise the control will behave unpredictably as it relies on this. What you can do if you have bad performance, because of the sort is to use the SuspendSort method. This method will stop the sorting until the ResumeSort method is called. This can help you when you are modifying the appointment collection a lot of times (like adding a large number of appointments). Then you can suspend the sort when you start adding them and then resume it after you are done with that operation. For more information on this method please visit this link:
http://help.infragistics.com/Help/Doc/WinForms/2014.1/CLR4.0/html/Infragistics4.Win.UltraWinSchedule.v14.1~Infragistics.Win.UltraWinSchedule.AppointmentsCollection~SuspendSort.html
Please let me know if you have any additional questions.
Hi Dimitar,
Unfortunately, I don't have this method in my current version (10.1).
Is there any other ways i can do that? I can see that even using the Contains method of the AppointmentCollection i'm ending up doing a sort via the GetIndex method in AppointmentCollection.
This is really killing the performance right now.
Crossing my fingers for a solution.