Get Selected Row in DataGridView not working VB.Net -
i have pretty standard datagridview , have used .selectionmode = datagridviewselectionmode.fullrowselect .multiselect = false in order ensure entire row selected. situation : need obtain selected row in order load data in row screen "modify" data. using following selected row. private sub datagridview2_cellcontentclick(sender object, e datagridviewcelleventargs) handles datagridview2.cellcontentclick try if e.rowindex >= 0 dim row datagridviewrow row = me.datagridview2.rows(e.rowindex) globalvariables.selectedlineitemrowno = e.rowindex ' or row msgbox("globalvariables.selectedlineitemrowno ---> " & globalvariables.selectedlineitemrowno) 'textboxtst.text = row.cells("description").value.tostring end if catch ex exception msgbox(ex.message) end try end sub question : problem of time when 1 clicks on data within dgv code above run ,...