I have a datagridview that is a full row select. How would I grab the data from only a certain cell no matter what cell in the row was clicked on since it highlights the ent
To get one cell value based on entire row selection:
if (dataGridView1.SelectedRows.Count > 0) { foreach (DataGridViewRow row in dataGridView1.Rows) { TextBox1.Text = row.Cells["ColumnName"].Value.ToString(); } } else { MessageBox.Show("Please select item!"); } }