title: In DataGridView turn ReadOnly property of column to false when adding new row, on updating its true (c#.net)
body: <p>I have set the readonly property of 2 datatable columns to true.</p>
  
  <pre><code>    List.Columns[0].ReadOnly = true;
      List.Columns[1].ReadOnly = true;
  </code></pre>
  
  <p>But i only want them to be read only when user is trying to update, User can add new rows to dataGridView so i want to turn the readonly property to false when trying to add new row. i tried doing this on CellDoubleClick event of the datagrid but it wont do anything as it is to late for the beginedit to be called.</p>
  
  <pre><code>if(e.RowIndex == GridView.Rows.Count-1)
                  GridView.Rows[e.RowIndex].Cells[1].ReadOnly = GridView.Rows[e.RowIndex].Cells[0].ReadOnly = false;
              else
                  GridView.Rows[e.RowIndex].Cells[1].ReadOnly = GridView.Rows[e.RowIndex].Cells[0].ReadOnly = true;
  </code></pre>
  
  <p>Any ideas</p>