[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!
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.
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.