Implement a custom appointment provider. Is there a mechanism for the provider to get the resources once and then keep them in the scheduler for duration of the page? I would expect the provider to supply the resources and the scheduler to keep them until they are explicitly changed (ie. for another view). But in my case, the provider has to get the resources from the database every time it is accessed (ie. getting appoitments, adding appointment)
I have overridden GetResources(ISchedulerInfo schedulerInfo) to return the resources available to the scheduler; however, it doesn't seem right to me that it queries the backend for the resource definitions on every postback.
If I set the resources programmatically the scheduler seems to maintain the resources on postbacks. For example...
What am I missing with the implementation of a custom provider? How do you get the provider to supply the scheduler with its Resource collection just once.
Thanks.
I have overridden GetResources(ISchedulerInfo schedulerInfo) to return the resources available to the scheduler; however, it doesn't seem right to me that it queries the backend for the resource definitions on every postback.
If I set the resources programmatically the scheduler seems to maintain the resources on postbacks. For example...
if
(!Page.IsPostBack)
{
ResourceType providers =
new
ResourceType(
"Providers"
);
providers.DataSource = ScheduleAdapter.GetViewResources(defaultView.ResourceViewID);
providers.KeyField =
"ResourceID"
;
providers.TextField =
"Resource"
;
providers.ForeignKeyField =
"ResourceID"
;
RadScheduler1.ResourceTypes.Add(providers);
}
What am I missing with the implementation of a custom provider? How do you get the provider to supply the scheduler with its Resource collection just once.
Thanks.