Hi,
I am having a bit of trouble with the RadCombo that uses a treeview. Everything works perfectly except for the first time I try to select something from the tree. On the first attempt to click on a node in a tree I get the text of the first node and all it's childrens' nodes text concatted together as the text in the combo. If I drop down the combo a 2nd or subsequent time and select something it works as advertised. It's only on the first attempt. Below is all my client code.
Any help would be great!
I am having a bit of trouble with the RadCombo that uses a treeview. Everything works perfectly except for the first time I try to select something from the tree. On the first attempt to click on a node in a tree I get the text of the first node and all it's childrens' nodes text concatted together as the text in the combo. If I drop down the combo a 2nd or subsequent time and select something it works as advertised. It's only on the first attempt. Below is all my client code.
Any help would be great!
function comboLoad(sender, eventArgs) |
{ |
sender.set_text(sender.get_items().getItem(0).get_value()); |
} |
function tvCostCenter_NodeClicking(sender, args) |
{ |
var ddl = $find("Master_cntPageBody_ddlCostCenter"); |
var node = args.get_node() |
ddl.trackChanges(); |
ddl.get_items().getItem(0).set_value(node.get_value()); |
ddl.set_text(node.get_text()); |
ddl.set_value(node.get_value()); |
ddl.commitChanges(); |
ddl.hideDropDown(); |
} |
function StopPropagation(e) |
{ |
if(!e) |
e = window.event; |
e.cancelBubble = true; |
} |
function OnClientDropDownOpenedHandler(sender, eventArgs) |
{ |
var tree = sender.get_items().getItem(0).findControl("Master_cntPageBody_ddlCostCenter_i0_tvCostCenter"); |
var selectedNode = tree.get_selectedNode(); |
if (selectedNode) |
{ |
selectedNode.scrollIntoView(); |
} |
} |