By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,369 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,369 IT Pros & Developers. It's quick & easy.

Selecting a cell in a DataGridView

100+
P: 102
I am rather new to vb.net so please bear with me. I have a datagridview from which a user must select some data. In this example a list of companies are shown. To select a company you have to place the cursor on the text itself. Is there a way to place cursor anywhere within the cell to accomplish the same thing?

Expand|Select|Wrap|Line Numbers
  1. If e.RowIndex >= 0 Then
  2.             Dim row As DataGridViewRow
  3.             row = Me.dgvCompanies.Rows(e.RowIndex)
  4.             txt_COM_CompanyName.Text = row.Cells("CompanyName").Value.ToString
  5.             End If
  6.  
Jan 29 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.