HI,
ive got the following question.
I have a kendo Numerictextbox. however the value is only set when it is an int. when it is a double is doesn't fill the numerictextbox, because he doesn't know what to do with the value after the. so it leaves it completely empty.
However how can i get this working? becuase it does need to set a decimal ( price of products). Eventually i need to set the value of m.UnitPrice in the numerictextbox.
here is my code.:
- <div class="form-group">
- @Html.LabelFor(model => model.UnitPrice, new { @class = "col-lg-3 col-md-3 col-sm-3 col-xs-3 control-label" })
- <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
- @(Html.Kendo().NumericTextBoxFor<decimal>(m => m.UnitPrice)
- .HtmlAttributes(new {@class = "k-numerictextbox"})
- .HtmlAttributes(new {style = "width:100%"})
- .Min(-999999)
- .Max(999999)
- .Decimals(2)
- .Value(12.3M)
- )
- @*@(Html.EditorFor(m => m.UnitPrice))*@
- @Html.ValidationMessageFor(m => m.UnitPrice, "", new {@class = "text-danger"})
- </div>
- <div class="form-control-static col-lg-5 col-md-5 col-sm-5 col-xs-5">
- per maand
- </div>
- </div>