title: How to format a column with number decimal with max and min in DataGridView?
body: <p>I want to format the decimal places displayed and captured in a DataGridView, I have a minimum number of decimal places and a maximum number of decimal places.
  For example:</p>
  
  <pre><code>If caught, "120.0" display "120.00"
  If caught "120.01" display "120.01"
  If caught "120,123" display "120,123"
  If caught "120.1234" display "120.1234"
  If caught "120.12348" display "120.1235" (round)
  </code></pre>
  
  <p>In the DataGridView column "txtcDecimal" has the property (from the designer)</p>
  
  <pre><code>txtcDecimal.DefaultCellStyle.Format = "N2";
  
  txtcDecimal.DefaultCellStyle.Format = "0.00##";  // IS ANSWER. I do not work for an event that interfered
  </code></pre>
  
  <p>the mask "0.00##" work as "n2" only get 2 decimals
  which does the correct rounding to two decimal places but just do not like what I need (as I show in the example)</p>
  
  <p>How I can do it in a simple manner without consuming many resources?</p>
  
  <p><strong>Thanks harlam357 &amp; Tom Garske</strong></p>