Edit this page

Scroll to Selected Node After MS.NET AJAX Request

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:

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(OnEndRequest);

function OnEndRequest(sender, args) {
    var tree = $find("<%= RadTreeView1.ClientID %>");
    var selectedNode = tree.get_selectedNode();

    if (selectedNode != null) {
        selectedNode.scrollIntoView();
    }
}
Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy