Solved

DataGridView selected row in top

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now