datagridview how to select a row code example Example: c# datagridview select row index programmatically dataGrid.Rows[index].Selected = true;