Solved

How to navigate to specific cells in a datagridview programmatically?

Posted on 2006-06-19
1
445 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
ID: 16934088
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
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)…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 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