473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Selecting a cell in a DataGridView

102 64KB
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
0 975

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

Similar topics

7
by: Bill | last post by:
Column 0 in my unbound DataGridView is read-only. When the user tabs from the last column of a row, I need the focus to go to column 1 of the next row, not column 0. Have tried a wide variety of...
0
by: Pieter Coucke | last post by:
Hi, I have a DataGridView, that contains a list of Articles, which can be added (automaticly via the AllowUserToAddRows) and changed by the user. The current item is also displayed in textboxes...
0
by: None | last post by:
Hi, I'm using DataGridView in my Windows Forms project. I need to know how we can insert an image into the specified cell . I tried with the following code.
2
by: Karl | last post by:
Hi all, I'm reasonably new to csharp so you have to forgive me asking what may be a stupid question... As I said, I'm new to CSharp but in VB I was able to click anywhere on a DataGridView...
1
by: JaxDawg | last post by:
Hey folks... I've got an interesting problem. I'm updating and displaying an excel spreadsheet (using com) from a php file. Works great in the debugger (PhpEd 4.6), but not otherwise. I assume...
1
by: BisterBooster | last post by:
Hi, Can someone help me for next problem How to for using ENTER key to move to the right cell instead of the TAB key Many thanks in advance Marc.
0
by: san1014 | last post by:
Hi to all' I am using Java swings. I written a code to display a table. In the table i used Boolean.class type column. when i click the checkbox it value to be change from false to true....
1
by: sravanthi29 | last post by:
I have a Datagridview that is read only. When selecting a row, the item should be edited in individual controls on the form, also bound to the same bindingsource. The default behavior is that...
2
by: Dom | last post by:
I posted this before, no takers. Trying again. Is there anyway to cancel the selection of a new cell in a DataGridView? For example, if the user selects a cell with the control key down, then...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.