Here's how to loop through an ASP.NET datagrid
Dim a As Int16 For a = 0 To Me.grdLines.Items.Count - 1 'get a reference to the row id intDexRowID = CType(Me.grdLines.Items(a).FindControl("lblDexRowID"), Label).Text Next