private void dataGridView1_RowValidating(object sender, DataGridViewCellCancelEventArgs e) { string str1 = dataGridView1.CurrentRow.Cells[1].Value.ToString(); for (int i = 0; i < dataGridView1.Rows.Count - 2; i++) { string str = dataGridView1.Rows[i].Cells[1].Value.ToString(); if (str==str1) { MessageBox.Show("same occur"); ColumnLocationDemo } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)