Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

DataGridView selected row in top

Posted on 2006-06-20
3
291 Views
Last Modified: 2010-04-23
Hello Expert,

I select an row in the DataGridView

e.g. Me.DataGridView1.CurrentCell = DataGridView1.Rows(nRow).Cells(0)

But I also want that this row is shown on the first line in the grid

I can do that by scrolling myself, but should be done automatically.

Regards,

dgb
0
Comment
Question by:dgb
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
vadim63 earned 500 total points
ID: 16943495
Me.DataGridView1.CurrentCell = DataGridView1.Rows(nRow).Cells(0)
Me.DataGridView1.FirstDisplayedScrollingRowIndex = nRow
0
 

Author Comment

by:dgb
ID: 16943550
It works!

Thanks vadim63
0
 
LVL 10

Expert Comment

by:vadim63
ID: 16943552
Good luck! Thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question