How to set datagrid to column 0 row 0

Posted on 2004-08-29
Last Modified: 2010-04-17
How do I set a datagrid so that the focussed or active grid or the cursor is at 0,0 in visual basic ?.
Question by:Netlink2
LVL 49

Accepted Solution

Ryan Chong earned 250 total points
ID: 11926169

Private Sub Command1_Click()
    DataGrid1.Row = 0
    DataGrid1.col = 0
End Sub

Assisted Solution

IceColdas earned 250 total points
ID: 11931439
Dim myCell As New DataGridCell()
myCell.RowNumber = 0
myCell.ColumnNumber = 0
dataGrid1.CurrentCell = myCell

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mergeTwo  challenge 13 84
groupSumClump challenge 9 100
Looking for example pivot year code used in Y2K 4 61
Microsoft C++ code failing in executable that worked 9 85
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

910 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

22 Experts available now in Live!

Get 1:1 Help Now