Visual Basic: DataGrid Control
VisibleRows Property Example
This example selects all the rows that are currently visible on the grid.
Private Sub SelectVisible_Click ()
Dim I
For I = 0 To DataGrid1.VisibleRows - 1
DataGrid1.SelBookmarks.Add DataGrid1.RowBookmark(I)
Next I
End Sub