Solved

DataGridView selected row in top

Posted on 2006-06-20
3
312 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
[X]
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
  • 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

Technology Partners: 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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

624 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