Use a custom provider property in dropdown

3 posts, 0 answers
  1. Alex
    Alex avatar
    17 posts
    Member since:
    Sep 2005

    Posted 04 Mar 2011 Link to this post

    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. Alex
    Alex avatar
    17 posts
    Member since:
    Sep 2005

    Posted 07 Mar 2011 Link to this post

    any help on this one?
  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 09 Mar 2011 Link to this post

    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!
Back to Top