foreach (DataGridViewColumn column in dataGridView.Columns) { //Maybe check if value matches if(column.HeaderText == "Column1") { //Do Something } }
if (dataGridview.CurrentRow.Cells["Comlumn header name"].Value.ToString() == "Cell in Datagridview") { //Do Something }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)