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

RadTreeview -Selected nodes value in the new window which is open by window.open -URGENT

1 Answer 60 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Sindu
Top achievements
Rank 1
Sindu asked on 02 Feb 2012, 08:01 PM
Hi,

I have a radtreeview in aspx page .it has 5 nodes and each nodes have 3 children.
In the same window I have a button .
I have checked some of the in the nodes in the treeview.

When I click on the button a new window will be opened.
How to get these selected nodes values in the newly opened window?
My aim is to create a Telerik report on the newly opened window  based on the selected nodes  in the radtreeview.
How to achieve my aim?

Thanks

Sindu.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Feb 2012, 06:41 AM
Hello,

Try the following.
JS:
function OnClientClick()
 {
  var RadWindow1 = $find("<%=RadWindow1.ClientID %>");
  var tree = $find("<%=RadTreeView1.ClientID %>");
  var label= document.getElementById("HiddenField").value;
  var label1 = document.getElementById(label);
  var val= "";
  var node = tree.get_allNodes();
  for (i = 0; i < tree.get_allNodes().length; i++)
  {
   if (node[i].get_checked() == true)
   {
     val = val + node[i].get_value();         
   }                 
 }
  label1.innerHTML = val;
  RadWindow1.show();
}
Note: Here I set the text in a label inside RadWindow.

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