This is a migrated thread and some comments may be shown as answers.

Calling RadScheduler1.Rebind() duplicates resources with ServerSide ResourcePopulationMode

1 Answer 18 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 09 Oct 2013, 12:32 PM
We have a RadScheduler using a web service binding with ResourcePopulationMode="ServerSide".  The GetResources method is as per the documentation:
[WebMethod]
public static IEnumerable<ResourceData> GetResources(MySchedulerInfo schedulerInfo)
{
    return Controller.GetResources(schedulerInfo);
}
If we call RadScheduler1.Rebind() in the code behind then GetResources is called but the resources are added to the RadScheduler rather than replacing them, with the result that duplicate resources appear.

Is this the expected behaviour?  Are we supposed to be rebinding the scheduler differently?

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 14 Oct 2013, 11:31 AM
Hello Rob,

 
Thank you for contacting Telerik support.

Yes this is am expected behavior when RadScheduler is bound to Web Service binding  that is caused by the specific way the resources are loaded from the server side in such scenarios. That is why in such cases we recommend rebinding RadScheduler as in the code below:

protected void RadButton1_Click(object sender, EventArgs e)
      {
          RadScheduler1.Resources.Clear();
          RadScheduler1.Rebind();
      }

Hope this will explain the issue. If you have further questions please don't hesitate to contact us again.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Dev
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or