?
Solved

DataGridView Scroll To Row?

Posted on 2007-07-21
3
Medium Priority
?
4,135 Views
Last Modified: 2008-09-22
I'm trying to make a "Quick Find" for a dataGridView.

I have a datagridVeiw filled with 40,000 rows and need to scroll the dataGridView to the number typed into a textbox.

The textBox event will fire the Quick Find code, but not sure how to scroll the loaded grid.

[datatable]
PrimaryKey,  Number,  Description
0
Comment
Question by:kvnsdr
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
JimBrandley earned 1000 total points
ID: 19541405
You can set the DataGridView.FirstDisplayedCell property to the index of the row. That should move it to the top of the grid.
0
 
LVL 22

Expert Comment

by:JimBrandley
ID: 19541406
Sorry - I meant to select Proposed solution for that.
0
 

Expert Comment

by:Chris_Rennie
ID: 21473942
The actual answer to the question is to use DataGridView.FirstDisplayedScrollingRowIndex = (index of the selected row).
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

579 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