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
Solved

How to navigate to specific cells in a datagridview programmatically?

Posted on 2006-06-19
1
446 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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