Monday, 3 August 2015

How to get Value of CurrentCell of Datagridview when user click

Dim s As System.Drawing.Point

s = me.dataGridView.currentCellAddress

dim id as string

'By Column index
id = me.dataGridView.item(0,s.Y).value.toString

OR

'By Column Name
id = me.dataGridView.item("ID",s.Y).value.toString