Show Cell Contents from Datagrid (Resolved)
How do I show the contents of the cell in a datagrid instead of the row index as I am below.
VB Code:
'
Private Sub dgvRoutes_CurrentCellChanged( _
ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles dgvRoutes.CurrentCellChanged
Dim id As String = CStr(dgvRoutes.CurrentCell.RowNumber)
MessageBox.Show(id)
End Sub
Re: Show Cell Contents from Datagrid
Code:
Messagebox.show (dgvRoutes.Item(dgvRoutes.CurrentCell.RowNumber, 5))
would show the contents of cell 5 in the current row
Re: Show Cell Contents from Datagrid
Thank you Petevick. That worked perfectly.