Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement