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

[Solved] Multi-valued Resource Example - Get Resources Failure

1 Answer 71 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alex Occhipinti
Top achievements
Rank 1
Alex Occhipinti asked on 25 May 2009, 07:50 AM

  The sample/demo for having multiple-valued resources works well, however, I'm stumped by part of the implementation for my own version.  Specifically the call to GetResources within the MultipleValuesResourceControl.ascx shows:

IEnumerable<Resource> resources = Owner.Resources.GetResourcesByType(resType);

  This makes perfect sense, but it returns 0 objects.  However, when I replace that line with:

IEnumerable<Resource> resources = Owner.Provider.GetResourcesByType(Owner, resType);

  I receive the proper resources.  Is it possible that Owners.Resources is not the same as Owner.Provider?  If so, how do I get Owner.Resources to point to the right place?  I'm guessing that the change I made will work for here, but not for the actual saving and returning of the values for events.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 25 May 2009, 02:39 PM
Hello Alex,

The Resources collection of RadScheduler is populated from the provider during data binding. Setting the provider using ProviderName or through the code-behind (in the Page_Init method) should be enough for this to work. If this fails to work, it'll be great if you can send us a code sample, so we can try to debug it.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Alex Occhipinti
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or