title: swap rows in datagridview in c#
body: <p><br>
  i have a datagridview which is not related with dataTable.<br>
  and i want to swap for example 1st and 10th rows in datagridview.<br>
  i use this code for it</p>
  
  <pre><code>int row_1 = 1;
  int row_10 = 10;
  for(int i=0;i&lt;grid.ColumnCount;i++)
  {
    string temp = grid.Rows[row_1].Cells[i].Value.ToString();
    grid.Rows[row_1].Cells[i].Value = grid.Rows[row_10].Cells[i].Value.ToString();
    grid.Rows[row_10].Cells[i].Value = temp;
  }
  </code></pre>
  
  <p>but i want to know is there any simple way to do this?? </p>