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
1175
Does ScrollTop scroll the page as well
posted

Hello there,

I found this thread: http://ko.infragistics.com/community/forums/t/60872.aspx

My goal is to scroll to the bottom of the grid and the page, when the user clicks on a button to add an empty row at the end.

I tried something like this:


            const int ROW_HEIGHT = 25;
            const int ROWS_PER_TAB = 200;
            dgrRoles.ScrollTop = Math.Min(dgrRoles.Rows.Count, ROWS_PER_TAB) * ROW_HEIGHT;

Since maximum rows are 200, I dont need to check more. But kinda nothing happens. Should this work for scrolling the whole page too?


Thanks for your response

Matthias

Parents
No Data
Reply
  • 49378
    posted

    Hello Matthias,

    Thank you for posting in the community.

    Setting the scrolltop property of WebDataGrid would not scroll your entire page, however setting the scoll position of the page itself is possible using javascript. I am attaching a sample demonstrating how the page is scrolled to its end (in this case this is done at the grid's clientside Initialize stage).

    Please let me know if this helps.

    WebDataGridScrollPageToBottom.zip
Children