Hi
I have two situations with treeview:
1) I have a textbox where I enter an ID to search in a treeview. Sometimes, the textbox loses focus and I cannot insert nothing any more. The textbox is in the same window with treeview.
2) I have a searching operation using server code to find and select the node I'm looking for. After that, server code calls a Javascript function to load detailed information in another window. This is working ok, however, I need to guarantee that selected node is visible and not outside of my window. It seems that "scrollIntoView" is the solution to this.
I try to add this code:
var tree = $find("<%= RadTreeView1.ClientID %>");
if (tree.get_selectedNode() != null)
{
tree.get_selectedNode().scrollIntoView();
}
but I got an error: 'null' is null or not an object.
I'm calling my javascript function using scriptmanager.RegisterClientScriptBlock
Regards
I have two situations with treeview:
1) I have a textbox where I enter an ID to search in a treeview. Sometimes, the textbox loses focus and I cannot insert nothing any more. The textbox is in the same window with treeview.
2) I have a searching operation using server code to find and select the node I'm looking for. After that, server code calls a Javascript function to load detailed information in another window. This is working ok, however, I need to guarantee that selected node is visible and not outside of my window. It seems that "scrollIntoView" is the solution to this.
I try to add this code:
var tree = $find("<%= RadTreeView1.ClientID %>");
if (tree.get_selectedNode() != null)
{
tree.get_selectedNode().scrollIntoView();
}
but I got an error: 'null' is null or not an object.
I'm calling my javascript function using scriptmanager.RegisterClientScriptBlock
Regards