Click here to Skip to main content
12,822,050 members (43,821 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# DataGridView
Hi..
I have a dgv in a form having a number of rows. I have next and previous buttons to move to the respective rows in the dgv. The next and previous are working correctly. The dvg shows 10 rows at a time. When i select the 11th or the upcoming row we can not see that row. So how can i scroll to that row to see it selected?
I think someone can help me.Thanks in advance..
Posted 5-Aug-10 19:15pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

if i is selected row in dataGridView1 and j is selected column , try :
dataGridView1.FirstDisplayedScrollingRowIndex =i;

dataGridView1.CurrentCell = dataGridView1[j,i];
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Try DataGridView.FirstDisplayedScrollingRowIndex.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 22 Jan 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100