Documentation for this section has not yet been entered.
The DataGridView.SelectionMode property must be set to DataGridViewSelectionMode.FullRowSelect or DataGridViewSelectionMode.RowHeaderSelect for the DataGridView.SelectedRows property to be populated with selected rows.
This property contains a read-only snapshot of the selection at the time it is referenced. If you hold onto a copy of this collection, it may differ from the actual, subsequent System.Windows.Forms.DataGridView state in which the user may have changed the selection. You should therefore not operate on a copy of the collection.
To programmatically select a row, set its DataGridViewRow.Selected property to true.