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

[Solved] How do you access the properties of a custom provider?

4 Answers 88 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Shaul Behr
Top achievements
Rank 1
Shaul Behr asked on 20 Oct 2009, 11:03 AM
Hi there,

I have implemented a custom provider for my RadScheduler, and everything appears to be working - at least, the overridden methods in that provider are being called when the scheduler loads up.
But in order to get it working completely, I have to have access to the public interface of my custom provider from the form on which my scheduler appears.  And that is a lot trickier than I had expected.  See, the scheduler has a "ProviderName" property, which is set, as expected, to "MyCustomProvider1".  But the Provider property does not refer to an instance of the MyCustomProvider class!  scheduler.Provider.Description even says "MyCustomProvider1" - but how do I get access to the MyCustomProvider object itself?

Thanks,
Shaul

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Oct 2009, 08:53 AM
Hello Shaul,

Can you describe in detail what you need to achieve? The ability to access an instance of your provider class depends on the way you define your provider.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Shaul Behr
Top achievements
Rank 1
answered on 23 Oct 2009, 09:40 AM
Hi Peter, thanks for your reply.

To create the provider I followed the design pattern described in the Teacher/Class/Students example in the RadScheduler documentation (obviously with some differences according to my situation).
Now my list of multiple selectable resources is not static; it is dynamic, depending on contextual data on the web page.  So I need to be able to pass to the provider a collection of objects that it can translate into available resources.
How do I pass that collection to my provider?

Thanks,
Shaul
0
Peter
Telerik team
answered on 23 Oct 2009, 01:29 PM
Hello Shaul,

Probably, you can use the following kb article:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-pass-parameters-to-a-custom-database-provider.aspx

Does this help?

Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Shaul Behr
Top achievements
Rank 1
answered on 26 Oct 2009, 06:44 PM
Thanks, that worked.
Kludgy, but effective nonetheless.
Thanks again,
Shaul
Tags
Scheduler
Asked by
Shaul Behr
Top achievements
Rank 1
Answers by
Peter
Telerik team
Shaul Behr
Top achievements
Rank 1
Share this question
or