I have a RadDropDownTree and a RadTreeView on the same page. Basically, a list of messages are being loaded on the page when a category is selected. The layout of this app requires that the treeview be displayed in a dropdown instead of the traditional treeview. Since I already have the radtreeview successfully executing all of the code I want it to when a node is selected, I was hoping to fire that code when a selection is made on the raddropdowntree. Right now, I have some code in javascript which causes a category to get selected in the radtreeview whenever the same cayegory is selected in the raddropdowntree. However, it seems that the radtreeview node is getting selected with this code, but it is not getting clicked. The messages do not get loaded the same way they would if someone were to explicitly click on the radtreeview node.
Here is my javascript which causes the readtreeview category to get selected when the same raddropdown is selected. Does anyone know how I can make it not just select the node, but also click on the node?
Here is my javascript which causes the readtreeview category to get selected when the same raddropdown is selected. Does anyone know how I can make it not just select the node, but also click on the node?
<
script
type
=
"text/javascript"
>
function OnClientDropDownClosed1(sender, eventArgs) {
var tree = $find("ctl00_MainContent_MessageList1_MessageFilter1_RadDropDownTree1");
var entries = tree.get_entries();
var selectedText = tree.get_selectedText();
document.getElementById("ctl00_MainContent_CategoryTree1_hfCategoryNum").value = selectedText;
SelectNode(selectedText);
}
function SelectNode(nodeName) {
var tree = $find("ctl00_MainContent_CategoryTree1_TreeViewDirectory");
var node = tree.findNodeByText(nodeName);
tree.trackChanges();
node.set_selected(true);
tree.commitChanges();
}
</
script
>