PDA

Click to See Complete Forum and Search --> : Show Cell Contents from Datagrid (Resolved)


BukHix
Jul 3rd, 2009, 10:48 PM
How do I show the contents of the cell in a datagrid instead of the row index as I am below.

'
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

petevick
Jul 4th, 2009, 01:16 AM
Messagebox.show (dgvRoutes.Item(dgvRoutes.CurrentCell.RowNumber, 5))
would show the contents of cell 5 in the current row

BukHix
Jul 4th, 2009, 11:45 AM
Thank you Petevick. That worked perfectly.