title: vb.net - datagridview - Formatting is not working
body: <p><strong>The situation</strong>:</p>
  
  <p>I have a datagridview with one column (col1).</p>
  
  <p>In the datagrid definition (design view), i have created this row, and set the formatting to C2 (or C0, or C - I tried them all).</p>
  
  <p>then, I load my datagrid view programmatically : </p>
  
  <pre><code>dbl_myValue as double   
  dbl_myValue = 6.99
  
  datagridview1.item(0,0) = dbl_myValue
  </code></pre>
  
  <p><em>The datagridView shows the data correcly : 6.99$</em></p>
  
  <p>When I "spy" on the datagridview.item(0,0),  <em>the "Value" property is a Double.</em></p>
  
  <p><strong>the problem :</strong></p>
  
  <p><strong>It doesn't work if the user manually enter a value</strong> : click in the cell, enter a numeric value (let's say 100, without decimal to avoid complexity) and then <em>leave</em> the cell (so no more in <em>edit</em> mode).
  The formating just dont applies.</p>
  
  <p>When I "spy" on the datagridview.item(0,0),  <strong>the "value" property is a STRING.</strong></p>
  
  <p>So I guess this is the problem, but what can I do?</p>
  
  <p>I've tried to go in CellValidating and stuffing it with code like:</p>
  
  <pre><code>Private Sub DataGridView1_CellValidating(....) 
  
  Dim c As Control = DataGridView_WorkOrderAddition.EditingControl
  
  c.text = formatNumeric(c.text) 
  
  c.text = convert.toDouble(c.text)
  </code></pre>
  
  <p>But it still doesn't work.</p>