bind the select node of the radtreeview

2 posts, 0 answers
  1. Savyo
    Savyo avatar
    75 posts
    Member since:
    Apr 2012

    Posted 09 Oct 2012 Link to this post

    Hi
         I have a radtreeview inside radcombobox. I want to bind the select node of the radtreeview as the text in the radcombobox. How can I achieve that. Please help
    thanks in advance
    Savyo
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Oct 2012 Link to this post

    Hi Savyo,

    Try the following code snippet in the OnClientNodeClicking event of RadTreeView.

    JS:
    <script type="text/javascript">       
      function OnClientNodeClicking(sender, args)
       {
         var comboBox = $find("<%= RadComboBox1.ClientID %>");
         var node = args.get_node()
         comboBox.set_text(node.get_text());
         comboBox.trackChanges();
         comboBox.get_items().getItem(0).set_text(node.get_text());
         comboBox.commitChanges();
         comboBox.hideDropDown();
       }
    </script>

    Take a look into this demo for more information.

    Regards,
    Princy.
Back to Top