Hi,
I have a standard grid with a NumericTextBoxFor field using inline editing in a MVC5 project.
The NumericTextBoxFor is configured to show 5 digits after the decimal separator in both the editor-template and the HTML code.
The problem is, that the 5 digits is only shown if the NumericTextBoxFor is selected when in edit mode or if not in edit mode at all - otherwise only 2 rounded digits is shown.
Any idea ?
I have a proof-of-concept to show, if this is new to you.
Thank you in advance.
8 Answers, 1 is accepted
When you configure the format for the editor the corresponding decimal digits should be displayed. Check out the following sample as illustration.
In case the behavior you are seeing persists, please provide your code so we can examine it.
Regards,
Viktor Tachev
Telerik
Hi Viktor,
I have a 8 mb. zip file containing a sample solution, but are not able to upload the file due to some constrains in this website.
Where can I put the file ??
Thanks.
You can upload the file to a file sharing service (e.g. Dropbox) and provide the link. Alternatively, you can open a support ticket and attach the archive there.
Regards,
Viktor Tachev
Telerik
Ticket 969162.
Thank you.
I have replied in the ticket you have submitted. I suggest we continue the conversation there.
Regards,
Viktor Tachev
Telerik
I have this situation, can we put the solution code here?
Hi Brian,
To specify the number of decimals that will be displayed by the NumericTextBox editor you can configure the Decimals and Format option for the editor. It would look similar to this:
@(Html.Kendo().NumericTextBoxFor(m => m)
.Decimals(5)
.Format("{0:n5}")
)
Regards,
Viktor Tachev
Progress Telerik