New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Scroll to Selected Node After AJAX Request

To scroll to the selected TreeNode after an AJAX request has occurred you should subscribe to the ClientEvents-OnResponseEnd event of RadAjaxPanel and use the ScrollIntoView() client-side method of RadTreeNode class like:

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" ClientEvents-OnResponseEnd="OnResponseEnd">
</telerik:RadAjaxPanel>
function OnResponseEnd(sender, eventArgs) {
    var tree = $find("<%= RadTreeView1.ClientID %>");
    var selectedNode = tree.get_selectedNode();

    if (selectedNode != null) {
        selectedNode.scrollIntoView();
    }
}

See Also

In this article