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
150
Selecting Rows
posted

I was wondering if there is a way to tell if a row is visible on the screen. For example:

I have a table with 15 rows, only 10 rows are visible in the grid based on the size of the grid. The other 5 rows can be seen when the scrollbar is moved. The next step is to select the 10th row and move it down using an arrow button. It is now the 11th row and NOT visible in the display. In this instance I want to select the new row and adjust the grid to make sure that the row is visible to the user.

 At the moment I have this code executing after the move up or move down:

_tableUltraGrid.Rows[index].Selected = true;

_tableUltraGrid.Rows[index].Activate();

The problem with this code is that it causes the screen to flicker and jump the scrollbar around everytime I perform a move operation. When really I only need to move the scrollbar when the moving row is no longer visible.

 Any input would be great!

Thanks

Justin 

 

  • 927
    posted

    I think you want the ScrollRowIntoView method of the ActiveRowScrollRegion. It scrolls your grid to display the specified row, but if that row is already visible, it doesn't do anything.