Hi to all,
I need to show a WaitingBar during mapping my appointments. How can I do this?
Actually I have a custom control with this structure: a Panel that contains sequentially RadNavigator (Dock.Top) > RadScheduler (Dock.Fill) > RadWaiting (Dock.Bottom)
I can't set a DataSource directly to the database, I used a BindingList<CustomAppointment>
During intercept some event's scheduler and navigator, fire a my delegate event NeedData that asks to Windows program to execute load data for specific period.
In this case if items of my BindingList<CustomAppointment> contains a lot of items, the primary thread is freezing.
I would use a RadWaitingBar to show a "waiting period" to user.
How can I do this? Normally I resolve this problem.... but on WPF Application with RadBusyIndicator :-)
01.
#region navigator events
02.
void
NavigatorNavigateForwardsClick(
object
sender, EventArgs e)
03.
{
04.
if
(NeedData !=
null
)
05.
NeedData(scheduler.ActiveView.StartDate, scheduler.ActiveView.EndDate);
06.
}
void
NavigatorNavigateBackwardsClick(
object
sender, EventArgs e)
07.
{
08.
if
(NeedData !=
null
)
09.
NeedData(scheduler.ActiveView.StartDate, scheduler.ActiveView.EndDate);
10.
}#endregion#region scheduler eventsvoid SchedulerActiveViewChanged(
object
sender, SchedulerViewChangedEventArgs e)
11.
{
12.
if
(NeedData !=
null
)
13.
NeedData(scheduler.ActiveView.StartDate, scheduler.ActiveView.EndDate);
14.
}
01.
// create and configure a scheduler binding source
02.
schedulerBindingDatasource =
new
SchedulerBindingDataSource();
03.
// map the MyAppointment properties to the scheduler
04.
appointmentMappingInfo =
new
AppointmentMappingInfo();
05.
appointmentMappingInfo.Start =
"Start"
;
06.
appointmentMappingInfo.End =
"End"
;
07.
appointmentMappingInfo.Summary =
"Subject"
;
08.
appointmentMappingInfo.Description =
"Description"
;
09.
appointmentMappingInfo.Location =
"Location"
;
10.
appointmentMappingInfo.UniqueId =
"Id"
;
11.
appointmentMappingInfo.Exceptions =
"Exceptions"
;
12.
appointmentMappingInfo.ResourceId =
"ResourceId"
;
13.
appointmentMappingInfo.StatusId =
"StatusId"
;
14.
appointmentMappingInfo.BackgroundId =
"BackgroundId"
;
15.
16.
schedulerBindingDatasource.EventProvider.Mapping = appointmentMappingInfo;
17.
// assign the generic List of CustomAppointment as the EventProvider data source
18.
schedulerBindingDatasource.EventProvider.DataSource = customAppointments;
19.
20.
if
(customResources !=
null
)
21.
LoadCustomResources();
22.
23.
scheduler.DataSource = schedulerBindingDatasource;