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
1325
Determine if grid is scrolled to the end
posted

How can I determine if grid is scrolled to the end (thumb is at the bottom of a scroll bar)?

Parents
  • 180
    posted

    Hi adogg

    I've always found you need to use a combination of the Grid.ActiveRowScrollRegion to get the ScrollPosition and the ActiveRowScrollRegion.VisibleRows.Count to deteremine if we are scrolled to the bottom of a grid. You also need to know the number of rows of data that you have available to display.

    The scroll position tells you which row of the grid is the top most visible at the present time and the visible rows is the number you can see on the screen.

    So, if ScrollPosition + VisibleRows.Count  > DataSet.Rows.Count then the last row is visible.

    Hope that helps

    Alan

Reply Children