|
-
Sep 18th, 2007, 05:45 PM
#1
Thread Starter
Member
[RESOLVED] [2005] How the heck do I get the selected cell in datagridview
I have it set to
DataGridView1.SelectionMode = DataGridViewSelectionMode.CellSelect
DataGridView1.MultiSelect = False
so why can't I do this:
Button_click blah blah blah handles a button click
MsgBox(DataGridView1.SelectedCells.Item)
end sub
Thanks!
-
Sep 18th, 2007, 05:52 PM
#2
Thread Starter
Member
Re: [2005] How the heck do I get the selected cell in datagridview
Ok, I guess it is something like this:
MsgBox(DataGridView1.CurrentCell)
Problem is, I want to return the data from the next column in that row, not the actual selected cell.
-
Sep 18th, 2007, 05:54 PM
#3
Thread Starter
Member
Re: [2005] How the heck do I get the selected cell in datagridview
ok nevermind, I figured it out after a couple hours of fustration, it is:
MsgBox(DataGridView1.CurrentRow.Cells(1).Value)
Thanks for the great response Slumber! oh wait, that's me! Ahhhhhhh. Anyway maybe this can help someone else.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|