title: How to pass a value to DGV Cell when its formatted to C2 format
body: <p>I'm struggling find a specific answer to this question, therefore asking it myself...</p>
  <p>I have a DataGridView with columns which has the following formatting applied to it:</p>
  <pre><code>DGV.Columns(3).DefaultCellStyle.Format = &quot;C2&quot;
  </code></pre>
  <p>On the form there is a text box in which the user enters a number and that value is then entered in one of the cells in DGV:</p>
  <pre><code>For Each dr As DataGridViewRow In DGV.Rows
      dr.Cells(&quot;ColumnHeader&quot;).Value = TextBox.Text
  Next
  </code></pre>
  <p>Before the above code is executed, this event occurs on the TextBox to format its value:</p>
  <pre><code>Private Sub TextBox_Leave(sender As Object, e As EventArgs) Handles TextBox.Leave
      TextBox.Text = FormatCurrency(TextBox.Text)
  End Sub
  </code></pre>
  <p>The text within the TextBox is displaying correctly as a currency, but when the code to put that into a cell in the DGV executes it fails saying the value is in incorrect format.</p>
  <p>Is <code>DGV.Columns(3).DefaultCellStyle.Format = &quot;C2&quot;</code> different format to <code>FormatCurrency(TextBox.Text)</code>?</p>