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

Treeview inside combobox

1 Answer 73 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
jincy
Top achievements
Rank 1
jincy asked on 04 Dec 2008, 06:21 AM
Hi,

I am using a treeview inside combobox, I want to disable the selections of parent nodes( first level nodes), that is I just want to select only child nodes. Anyone please help.

Regards,
Jincy

1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 05 Dec 2008, 01:17 PM
Hi Jincy,

I suggest to check the level of the clicked node in OnClientNodeClicking event handler like this:

 function nodeClicking(sender, args)  
 {  
   var comboBox = $find("<%= RadComboBox1.ClientID %>");  
   var node = args.get_node()  
   if(node.get_level() != "0")  
   {  
     comboBox.set_text(node.get_text());  
     comboBox.trackChanges();  
     comboBox.get_items().getItem(0).set_value(node.get_text());  
     comboBox.commitChanges();  
     comboBox.hideDropDown();  
   }  
 }  
 

Hope this helps.

Regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
jincy
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or