Hi,
I'm trying to grab a string of the value in the first column of a
DataGridView object on the selected row. What's the easiest way to go
about that?
I'm building part of a SQL statement inside a loop:
strSQL &= Str(myGrid.SelectedRow(ColumnIndex)) & "," &
Str(dgvResults.Item(1, i)) & "," & Str(Now) & ")"
Obviously, there's no "myGrid.SelectedRow(ColumnIndex)" function.
There's SelectedRows(Index), but that's for something else. What
should I use?
Thanks,
Andy 2 21216
Hi,
try this code:
DataGridView1.Rows(DataGridView1.CurrentCell.RowIn dex).Cells().Value
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.
"at*****@wi.rr.com" wrote:
Hi,
I'm trying to grab a string of the value in the first column of a
DataGridView object on the selected row. What's the easiest way to go
about that?
I'm building part of a SQL statement inside a loop:
strSQL &= Str(myGrid.SelectedRow(ColumnIndex)) & "," &
Str(dgvResults.Item(1, i)) & "," & Str(Now) & ")"
Obviously, there's no "myGrid.SelectedRow(ColumnIndex)" function.
There's SelectedRows(Index), but that's for something else. What
should I use?
Thanks,
Andy
On Jul 24, 1:32 am, Manish Bafna
<ManishBa...@discussions.microsoft.comwrote:
Hi,
try this code:
DataGridView1.Rows(DataGridView1.CurrentCell.RowIn dex).Cells().Value
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.
"atle...@wi.rr.com" wrote:
Hi,
I'm trying to grab a string of the value in the first column of a
DataGridView object on the selected row. What's the easiest way to go
about that?
I'm building part of a SQL statement inside a loop:
strSQL &= Str(myGrid.SelectedRow(ColumnIndex)) & "," &
Str(dgvResults.Item(1, i)) & "," & Str(Now) & ")"
Obviously, there's no "myGrid.SelectedRow(ColumnIndex)" function.
There's SelectedRows(Index), but that's for something else. What
should I use?
Thanks,
Andy- Hide quoted text -
- Show quoted text -
That was it! Thank you very much.
Andy Lewis This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Aaron Smith |
last post by:
Ok, this is an odd one, but I could use some assistance with the
framework 2 in VB.Net...
I want to have a DataGridViewColumn, only have it use the ComboBox, then
when they drop down the...
|
by: bob |
last post by:
Now this ought to be a simple matter. But nothing's simple in the Net
world, I'm finding.
In vb6 you could use "!" to force text to upper case in the format
function. I've searched the vb.net...
|
by: martin1 |
last post by:
Hi, All,
DataGridView is populated with all coumns from database since i need some
columns data for condition statement, after that I want to show rest of
column in the DataGridView, so how to...
|
by: svaradan |
last post by:
Hi
I have a situation where in I have two combo boxes in a datagridview control. The first combo box items are all static. But the second combo box items need to change based on the first...
|
by: bbasberg |
last post by:
Hi,
I am wondering how to get a value from one column based on another, using visual basic for applications. Here are the criteria: The first column contains status and we want the next row in...
|
by: Chalkie |
last post by:
Hello,
I've hit what appears to be a serious problem with an unbound datagridview control that Ive added to
a VB.Net program. Inadvertently I named one column 'Name' and a second 'Size'. The...
|
by: sk27ahmed |
last post by:
Hi
Any one can show me how to access datagridview column value on column checked unchecked.
I create one column in datagridview of type checkbox,and on button click i write code to select all...
|
by: Steve |
last post by:
Hi All
I am using VB.net 2005 windows forms
I use the Datagridview.cellformatting event to change the colours of
individual cells as required and all works fine
How can I do the same for...
|
by: JB |
last post by:
Hi All,
I'd like to display password characters in a DataGridView column, the
same way I can do in a standard TextBox by using the PasswordChar
property (i.e.typed characters replaced by a star...
|
by: lenniekuah |
last post by:
Hi Fellow Good Guys,
I need your help, Please Help me.
Surprising I encounterd another problem which never happened in VB.NET but in C# technique it causing problem.
Here is the explanation...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
| |