Solved

How to navigate to specific cells in a datagridview programmatically?

Posted on 2006-06-19
1
443 Views
Last Modified: 2006-11-18
Hi
I would like to know how I can move from one cell to another (not necessary in the same area) in a datagridview.
To be more specific, I have a datagridview that is checked each time a datamember is changed.
The checking process assigns error texts to the not validated cells.

How can I navigate from one error to another using some "Previous error" and "Next error" buttons I created, so that the user has not to look for errors, just to edit the cell's content in order to fit the right format?
0
Comment
Question by:humer2000
1 Comment
 
LVL 28

Accepted Solution

by:
iboutchkine earned 500 total points
Comment Utility
you have to set current cell

Private Sub setCurrentCellButton_Click(ByVal sender As Object, _
    ByVal e As System.EventArgs) Handles setCurrentCellButton.Click

    ' Set the current cell to the cell in column 1, Row 0.
    Me.dataGridView1.CurrentCell = Me.dataGridView1(1, 0)' col , row

End Sub

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Template or Software to write user guide 2 29
Xamarin 10 36
Format column on datatable 7 14
Achieve json result 2 20
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

12 Experts available now in Live!

Get 1:1 Help Now