TreeView in ComboBox

3 posts, 1 answers
  1. Monte
    Monte avatar
    7 posts
    Member since:
    Oct 2011

    Posted 05 Oct 2011 Link to this post

    I have a RadTreeView nested inside the ItemTemplate of a RadComboBox. It all works as I would expect. What I'm trying to add is the ability to search for a node directly by typing into the combo box.
    So basically if a user wants to they can use the tree view to drill down to the node they are looking for, or if they know the text in the node they could search directly for it.
    My problem is that when I add EnableLoadOnDemand=True and an OnItemsRequested handler I get the following error when typing into the combo box:
    'Script control 'DepartmentTree' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
    Parameter name: scriptControl'
    Any thoughts on if what I'm trying to do is possible? Anyone tried to something similar?
  2. Answer
    Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 06 Oct 2011 Link to this post

    Hello Monte,

    When you have server controls as templates the usage of load on demand is not supported. This is just a limitation of the asp.net framework.

    On other hand you could use the load on demand mechanism of the RadTreeView when embedded in RadComboBox. The following code library shows such implementation: Load On Demand TreeView in ComboBox.

    About searching for RadTreeView items when typing in the RadComboBox's input field, you could refer to the following KB section at our website: Search for TreeView items in ComboBox.

    Greetings,
    Ivana
    the Telerik team
    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 their blog feed now
  3. Monte
    Monte avatar
    7 posts
    Member since:
    Oct 2011

    Posted 06 Oct 2011 Link to this post

    That's great! Thanks for the help.
Back to Top