Solved

DataGridView selected row in top

Posted on 2006-06-20
3
297 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net Tranfer data between to VB.Net apps 8 44
Get month and date in a format 4 44
VB.NET Inline If statement 4 39
"lblTime is not declared" 3 28
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

713 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