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

Selecting TreeView Combobox Leaves

1 Answer 54 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 02 Nov 2008, 11:23 AM
Hi,
I am just getting started with these controls and one of the things I would like to do with the TreeView is to present it in a combobox very much like the example. The only twist is that I want to only allow the user to select leaves in the tree. No branches. Can this be done?
Thanks ... Ed

1 Answer, 1 is accepted

Sort by
0
Ed
Top achievements
Rank 1
answered on 02 Nov 2008, 05:43 PM
Nevermind. Figured it out. 

 

function nodeClicking(sender, args)
{
    
var comboBox = $find('RadComboBox1');
    var node = args.get_node()
    if (node.get_nodes().get_count() == 0)
    {
        comboBox.set_text(node.get_text());
        comboBox.set_value(node.get_value());
        comboBox.hideDropDown();
    }
}

Thanks ... Ed

 

 

Tags
TreeView
Asked by
Ed
Top achievements
Rank 1
Answers by
Ed
Top achievements
Rank 1
Share this question
or