Try like this code, I guess this code is helpfull for u.
Code:
int Value1=0, Value2=0; for (int row = 0; row < dataGridView1.Rows.Count; ++row) { Value1 = int.Parse(dataGridView1.Rows[row].Cells["Column1"].Value.ToString()); Value2 = int.Parse(dataGridView1.Rows[row].Cells["Column2"].Value.ToString()); if(Value1 > Value2) MessageBox.Show("Largest value
Leave a comment: