Getting Cell Values from Datagrid

tommyready

Member
Joined
Jul 1, 2009
Messages
23
Programming Experience
3-5
I'm trying to get the cell values from a datagrid of the row I single clicked on. I cant find one clear example in all of google on how to accomplish this. I have a very simple 4 column datagrid and when I single click on the row header I want to retrieve the cell values from that clicked row. Can anyone help with this? Thanks in advance!
 
This is the code I'm trying to test with on the datagrid header single click event
VB.NET:
        Try
            Dim i, j
            i = e.RowIndex.ToString
            j = dgWFTaskData.Rows.Item(i).Cells(1).Value()
            MsgBox(j)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
 
Back
Top