Multiselect treeview inside DropDown

2 posts, 0 answers
  1. Sreedath Kuttan
    Sreedath Kuttan avatar
    11 posts
    Member since:
    Jun 2008

    Posted 07 Jul 2009 Link to this post

    Is there a way to place a multiselect treeview inside the Dropdown.

    I want the dropdown to shrink to original size once the selections is done(not the expanded view)
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Jul 2009 Link to this post

    Hello Sreenath,

    You can try the following approach to use multi-select treeview in dropdown (RadComboBox).

    <telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientDropDownClosing="OnClientDropDownClosing"
            <telerik:RadTreeView ID="RadTreeView1"  OnClientLoad="OnClientLoad" runat="server" CheckChildNodes="True" MultipleSelect="True"
                 . . . 
            <telerik:RadComboBoxItem runat="server" /> 

    <script type="text/javascript"
    var treeview; 
    function OnClientLoad(sender) 
        treeview = sender; 
    function OnClientDropDownClosing(sender, eventArgs) 
      if( sender._focused == true
        var temp=""
        var nodes = treeview.get_selectedNodes(); 
        for (var i = 0; i<nodes.length ; i++) 
            temp = temp + nodes[i].get_text()+"; "

    I am not quite sure about your second requirement. Are you resizing the dropdown on selecting the items? If so you can set the width and height by setting the properties combo._dropDownWidth and combo._dropDownHeight where combo is the clientside object of RadComboBox.

Back to Top