All about my knowledge..
Dim activityId As Integer
activityId = dgActivity.Items(e.Item.ItemIndex).Cells(0).Text