Problem solved!! I started from scratch and noticed that this time I used a single ' instead of " at the start and end of the $find. It now works! (not even sure if this sorted it out)
This may seem to be a trivial question but how do I access the treeview's nodes in a Panelbar?
I have used the following where radLeftPane = PanelBar, Sites = PanelItem and radSites = RadTreeView
Complete function:
function getCheckedNodes()
{
var treeView = $find("<%= radLeftPane.FindItemByText("Sites").FindControl("radSites").ClientID %>");
var checkedNodes = treeView.get_checkedNodes();
if (checkedNodes.length > 0)
{
var checkedNodesText = new Array();
for (var i=0; i < checkedNodes.length; i++)
{
Array.add(checkedNodesText, checkedNodes[i].get_text());
}
alert(checkedNodesText.join(";"));
}
else
{
alert("There are no checked nodes!");
}
}
Absolutely nothing happens except a postback on the button that runs this code.
Any help will be most appreciated.
This may seem to be a trivial question but how do I access the treeview's nodes in a Panelbar?
I have used the following where radLeftPane = PanelBar, Sites = PanelItem and radSites = RadTreeView
Complete function:
function getCheckedNodes()
{
var treeView = $find("<%= radLeftPane.FindItemByText("Sites").FindControl("radSites").ClientID %>");
var checkedNodes = treeView.get_checkedNodes();
if (checkedNodes.length > 0)
{
var checkedNodesText = new Array();
for (var i=0; i < checkedNodes.length; i++)
{
Array.add(checkedNodesText, checkedNodes[i].get_text());
}
alert(checkedNodesText.join(";"));
}
else
{
alert("There are no checked nodes!");
}
}
Absolutely nothing happens except a postback on the button that runs this code.
Any help will be most appreciated.