title: how to delete duplicate rows from datagridview with unknown cloumns?
body: <p>how to delete duplicate rows from datagridview with unknown cloumns?</p>
  <p>this code isnt work.</p>
  <pre><code>int rws1 = dataGridView1.Rows.Count;
             
  int cl = dataGridView1.ColumnCount;
              
  for(int j = 0; j &lt;= rws1; j++)
    {
      for (int l = 0; l &lt;= rws1; l++)
        {
          for (int i = 1; i &lt;= cl; i++)
            {
              if (dataGridView1.Rows[j].Cells[i].Value == dataGridView1.Rows[l].Cells[i].Value)
                {
                  dataGridView1.Rows.Remove(dataGridView1.Rows[j]);
                }
            }
        }
    }
  </code></pre>