c# select line number 1 datagridview1 code example Example: c# datagridview select row index programmatically dataGrid.Rows[index].Selected = true;