Treeview inside combobox

2 posts, 1 answers
  1. jincy
    jincy avatar
    62 posts
    Member since:
    Oct 2007

    Posted 04 Dec 2008 Link to this post

    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

  2. Answer
    Yana
    Admin
    Yana avatar
    4815 posts

    Posted 05 Dec 2008 Link to this post

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