Visual Basic: DataGrid Control
A SelBookmarks collection contains a bookmark for each row selected in a DataGrid control.
Use the SelBookmarks property of the DataGrid control to return the SelBookmarks collection. Bookmarks are added to the SelBookmarks collection in the order they're selected. You can reposition the DataGrid control's current record pointer by setting the Bookmark property to one of the selected bookmarks in the SelBookmarks collection.
Use the Add method to add bookmarks to the SelBookmarks collection. Once a bookmark is appended to the SelBookmarks collection, it appears selected in the DataGrid control.
To remove a bookmark from the SelBookmarks collection, use the Remove method. Once a bookmark is removed from the SelBookmarks collection, it no longer appears selected in the DataGrid control.
The SelBookmarks collection supports the Add and Remove methods as well as the Count property. Using these methods and properties, you can manipulate the list of selected items in the DataGrid control. For example, you can programmatically select additional items by using the Add method, or determine the total number of selected items using the Count property.