how to use data grid view selection in c# code example Example: c# datagridview select row index programmatically dataGrid.Rows[index].Selected = true;