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

Use a custom provider property in dropdown

2 Answers 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 04 Mar 2011, 09:10 PM
Hello,
Ive created a custom DB provider in order to assign multiple resources to an appointment. I also have a custom advanced editing form that has a number of drop down lists. each custom dropdown has a corresponding custom attribute.  
I have coded my provider so all of the resources that need to be loaded into the dropdowns are available via properties but I dont know how to hook the two up? 
For example, I have the following property in my custom provider:

    private IDictionary<int, Resource> Locations
    {
        get
        {
            if (_locations == null)
            {
                _locations = new Dictionary<int, Resource>();
                foreach (Resource location in LoadLocations())
                {
                    _locations.Add(Convert.ToInt32(location.Key), location);
                }
            }
            return _locations;
        }
    }

How do I get these locations to populate a dropdown on my Advance Edit form?
Is this the recommended/correct way to do this?

Thanks
Alex

2 Answers, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
answered on 07 Mar 2011, 09:09 PM
any help on this one?
0
Peter
Telerik team
answered on 09 Mar 2011, 03:32 PM
Hello Alex,

Please, refer to the Advanced Templates demo. You can use Telerik's Visual Studio Extensions to get a stand-alone sample of this demo (see attached image).

Feel free to contact us if you need further assistance.

All the best,
Peter
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Scheduler
Asked by
Alex
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
Peter
Telerik team
Share this question
or