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

bind the select node of the radtreeview

1 Answer 74 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 09 Oct 2012, 10:15 AM
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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Oct 2012, 10:25 AM
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.
Tags
ComboBox
Asked by
Savyo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or