Horizontal scroll position getting reset when Ajax call is made from OnClientContextMenuShowing() function

2 posts, 0 answers
  1. Shahid
    Shahid avatar
    12 posts
    Member since:
    May 2009

    Posted 15 Nov 2010 Link to this post


    We are facing an Issue with the position of horizontal scroll of the rad tree view when we right click on any node of the tree to open its context menu.

    Suppose this scenario:- A user moves the horizontal scroll of the tree view towards right, then he right clicks on any tree node to open the context menu. When the context menu is visible, the position of the horizontal scroll is moved to the extreme left and do not remain at the position where the user has last left it.

    In the javascript function OnClientContexMenuShowing() we are making an Ajax call using the AjaxManager. Code is present below for your reference. It seems to me that this Ajax request is some how resetting the position of horizontal scroll bar to initial position( extreme left). Do we have any work around for thi Issue.. ?







    rad:RadTreeView ID="RadTreeView1" runat="server" Height="96%" OnClientContextMenuShowing="OnClientContextmenuShowing"





    OnClientNodeClicked="OnTreeNodeClick" OnClientDoubleClick="OnTreeNodeDoubleClick"





    OnClientContextMenuItemClicked="OnTreeContextMenuClick" OnClientNodeExpanding="toggleHandler"

















    function OnClientContextmenuShowing(sender, e) { 
    //Get the ajax manager object
    return false;





    function clientAjaxRequest(arg) {
    var ajaxManagerObject = $find("<%= RadAjaxManager1.ClientID %>"); 
  2. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 18 Nov 2010 Link to this post

    Hello Shahid,

    Well, this information (about the scroll position of the TreeView) is not implicitly persisted. You will have to remember the scroll position of both horizontal and vertical scroll and apply it on ClientLoad event of the TreeView.
    Since this is done on AJAX request, you don't need to store this data in cookies (the page is not completely reloaded) - you can simply store the values in some JavaScript variables.

    Nikolay Tsenkov
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top