title: How to change programmatically cell values of bound DataGridView without receiving exceptions?
body: <p>I have problems trying to change programmatically the content of a cell of a bound DataGridView.</p>
  
  <p>I implemented a minimal piece of code to show the problem.</p>
  
  <p>Do the following steps to replicate the problem:</p>
  
  <ul>
  <li>Launch example</li>
  <li>Write the title content to create a new row</li>
  <li>CTRL+C on inserted title</li>
  <li>Move to grid's empty row to force the creation of a new row</li>
  <li>CTRL+V on title cell</li>
  <li>Click on previous row (new row creation is cancelled)</li>
  <li>Click again to the empty row to force the creation of a new row</li>
  <li>Exception: <strong>Operation is not valid due to the current state of the object.</strong></li>
  </ul>
  
  <p>Here it is the code:</p>
  
  <pre><code>Public Class Form1
  
      Private _dgv As New DataGridView
      Private _Movies As New System.ComponentModel.BindingList(Of Movie)
  
      Public Sub New()
  
          InitializeComponent()
  
          Me.Controls.Add(_dgv)
  
          _dgv.Dock = DockStyle.Fill
          _dgv.DataSource = _Movies
  
          AddHandler _dgv.KeyDown, AddressOf DataGridView_KeyDown
  
      End Sub
  
      Private Sub DataGridView_KeyDown(sender As Object, e As KeyEventArgs)
  
          If e.Control AndAlso e.KeyCode = Keys.V Then
              _dgv.CurrentCell.Value = Clipboard.GetText
          End If
  
      End Sub
  
      Public Class Movie
          Public Property Title As String
      End Class
  
  End Class
  </code></pre>
  
  <p>For sure there is something wrong in my implementation but I spent many hours searching a workaround without success. Thank you in advance for any help you can give me.</p>