title: TextBoxFor decimal
body: <p>In my database I stored fields with the data type <code>decimal</code>. I am using exactly the same (<code>decimal</code>) data type in my ASP.NET application.</p>
  
  <p>This is inside my view in order to display the value.</p>
  
  <pre><code>@Html.TextBoxFor(model =&gt; model.Stock, new { id = "Stock", @class = "k-textbox" })
  </code></pre>
  
  <p>This pretty straight forward. The only issue I am facing is that by default in my view the data is displayed with 4 decimal places.</p>
  
  <p>I give you a few examples on how it looks and how it should look:</p>
  
  <blockquote>
    <ol>
    <li>1,0000 => 1</li>
    <li>1,2000 => 1,2</li>
    <li>1,4300 => 1,43</li>
    <li>1,8920 => 1,892</li>
    <li>1,5426 => 1,5426</li>
    </ol>
  </blockquote>
  
  <p>As you can see I want to cut off all the <code>0</code> as decimal places (only when displayed in the view).</p>
  
  <p>Remember: I am using commas instead of decimal points.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>My model</p>
  
  <pre><code>public class Article
  {
      public decimal? Stock{ get; set; }
  }
  </code></pre>