Man I thought I knew this one, but I did not. I am not sure where you need to retrieve the dataitem for the row, but for the RowDataBound event it would look something like this:
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
Dim drv As [String] = CType(e.Row.DataItem, [System.String])
'Perfom some logic on the drv here
end sub
I use string there as an arbitrary object value since I took it from some code where the data item is a string, it could be a datarow, custom object, etc.
In response to a RowCommand event handler I could not find a way to intuitively get the row index the wevent was fired from. In this case you can either attach the index as the commandargument or retrieve it based on the commandargument of your event firer, like a link button.
Until I can see a better way this may be what you have to do.