Friday, February 19, 2010

Find GridView Row And DataKey Value

Dim row As GridViewRow = DirectCast((DirectCast(e.CommandSource, LinkButton).NamingContainer), GridViewRow)
Dim RollNo As Integer
RollNo = CInt(MyGridView.DataKeys(row.RowIndex).Value)

No comments: