SHARE
TWEET

Untitled

a guest Jun 27th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (int i = 0; i < dataGridView1.RowCount ; i++)
  2.  {
  3.    for (int j = 0; j < dataGridView2.RowCount; j++)
  4.        {
  5.          if ( dataGridView1.Rows[i].Cells[0].Value.ToString() ==
  6.               dataGridView2.Rows[j].Cells[0].Value.ToString())
  7.             {
  8.                dataGridView1.Rows[i].Cells[0].Style.BackColor =
  9.                Color.Yellow;
  10.                dataGridView2.Rows[j].Cells[0].Style.BackColor =
  11.                Color.YellowGreen;
  12.             }
  13.        }    
  14.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top