Hi,
I load in the planner a big quantity of resources (aproximately 1000). On this big range of resources the Scheduler is very slow.
To load them, First I load the resources in the calendar.Schedule.Resources collections, then, I load my appointment in calendar1.Schedule.Items.
Finally (and it's the slowest section) I read all the calendar.Schedule.Resources collection to add the objects in calendar.Resources like this :
calendar1.Resources.Add(calendar1.Schedule.Resources[i]);
Do you know another way to load datas faster ?
To solve the time loading problem, I have tried to load the 30 First resources normally and the 970 next with an asynchronous thread. Like this :
void AddResources(int i) {
if (!calendar1.InvokeRequired) {
calendar1.Resources.Add(calendar1.Schedule.Resources[i]);
if (i % 20 == 0) {
calendar1.ResumeLayout();
calendar1.SuspendLayout();
}
}
else {
calendar1.Invoke(new AddResourcesDelegate(AddResources), new object[] { i });
}
}
This Solution gives a best video result than the first one (the screen remains white during the 1000 loading datas in the first case) but, the scheduler keep a big rate of system resources, and even if I call just a messagebox the called form appears just after the 1000 datas are completely loaded.
How could I solve this problem ?
Best Regards,
Thierry