TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cassie Mod
NA
488
70.5k
how to set a decimal value to kendo numerictextboxfor
Nov 14 2017 6:11 AM
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>
Reply
Answers (
0
)
how to send data post Request in asp.net my code here:
How to make intent to be dynamic