I have a datagrid view which has more rows than can be displayed. There is a thumb on the right which allows the user to move up and down through all of the rows. What I need to do programtically is at any given time determine which rows are actually viewable to the user. This datagridview is updated automatically every few seconds, however when an update is completed the focus is moved to the 1st cell in the 1st column which changes what is viewable to the user. If I can determine the first viewable row before the update then I can return the viewable area back to where it was and make the update unnoticeable to the user. I have googled this with all keywords I can think of but viewable and visible seem to get interchanged. My understanding is that if a row is visible it can be moved into the viewable area but may not be there at this time. I need to know which rows are actually viewable with no action from the user. Thanks in advance for any ideas or suggestions.

DaveD3

Take a look at dataGridView1.FirstDisplayedScrollingRowIndex

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.