Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Reset vertical scrollbar in ultrawebgrid after postback
posted

In the UltraWebGrid I have 100-200 rows such that the vertical scroll bar comes. When i move the vertical scrollbar down to the end and then click on reset button which refreshes the page, after this still the vertical scrollbar remains to the end and does not move up to show the first row of the grid. How to bring the scrollbar to the top to show the first row in the grid?

  • 2907
    posted

    Hi,

    You could quickly check following :

    (1) Create a java script  function which can be execute when your page is loaded after refresh.

    You may use window.onload = PageRefreshed;

    (2) This function could be like this

    function PageRefreshed()

    {

    var grid = igtbl_getGridById("<%= grid1.ClientID %>");

    grid.getDivElement().scrollTop = 0;

    }

    Are you using LoadOnDemand = XML? In that case the behavior may be different.

    Let me know if this helps you.