title: how to compare 2 rows in a dataGridView and highlight the different cells?
body: <p>how to compare two selected rows in a dataGridView?
  1.- I need to know how to detect the two selected rows
  2.- Compare the two selected rows
  3.- highlight the differences "cells"</p>
  
  <p>I've tried this but unfortunately I am lost.....</p>
  
  <pre><code>DataTable src1 = dataGridView1.DataSource as DataTable; //THIS IS PROBABLY NOT NEEDED
      DataTable src2 = dataGridView1.DataSource as DataTable;
          int index1 = 0;
  
          for (int i = 0; i &lt; src1.Rows.Count; i++)
          {
              var row1 = src1.Rows[i].ItemArray;
              var row2 = src2.Rows[i].ItemArray;
  
              for (int j = 0; j &lt; row1.Length; j++)
              {
                  if (!row1[j].ToString().Equals(row2[j].ToString()))
                  {
                      dataGridView1.Rows[i].Cells[j].Style.BackColor = Color.Red;
                      dataGridView1.Rows[i].Cells[j].Style.BackColor = Color.Red;
                  }
              }
          }
  </code></pre>