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

help in radcombobox

1 Answer 18 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 22 Jun 2012, 12:11 PM
I have a radcombobox and radtreeview. When I select an item in a radcombobox I need to remove all nodes in the treeview which has the value same as that of combobox item.

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Jun 2012, 01:03 PM
Hi Alan,

Try the following Javascript to achieve your scenario.

JS:
<script type="text/javascript">
 function OnClientSelectedIndexChanged(sender, args)
   {
      var tree = $find("<%=RadTreeView1.ClientID %>");
      var nodes = tree.get_allNodes();
      for (var i = 0; i < nodes.length; i++)
      {
         if (args.get_item().get_value() == nodes[i].get_value())
         {
            nodes[i].set_visible(false);
         }
      }
   }
</script>

Hope this helps.

Thanks,
Princy.
Tags
ComboBox
Asked by
Alan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or