RadTreeView for ASP.NET

Scrolling to the selected node after ajax request Send comments on this topic.
Example scenarios (How to) > Integration > Telerik RadTreeView with MS.NET AJAX > Scrolling to the selected node after ajax request

Glossary Item Box

To scroll to the selected TreeNode after an ajax request has occurred you should use the OnEndRequest client-side event of MS.NET AJAX and select the node in the OnEndRequest event handler, like:

  Copy Code
<script type="text/javascript">
   
var prm = Sys.WebForms.PageRequestManager.getInstance();
   prm.add_endRequest(OnEndRequest);
   function OnEndRequest(sender,args)
   {
      
var treeviewInstance = <%=RadTreeView1.ClientID %>;
      var selectedNode
= treeviewInstance.SelectedNode;
      
if (selectedNode != null)
      {
         
selectedNode.ScrollIntoView();
      }
   }
</script>