This is a migrated thread and some comments may be shown as answers.

What is TextBoxFor.Format functionality

1 Answer 2266 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Dan asked on 15 Oct 2018, 06:32 AM

I have an application where jquery validation is used. On a page I have to display some double numbers with formatting. The template used for doubles is the same for all values @Html.Kendo().TextBoxFor(model => model).HtmlAttributes(ViewData).

I have searched and it seems there is no way to format the number, however I see that the TextBoxBuilder has a property called Format. However this does not do anything.

What is the point of the property Format?

1 Answer, 1 is accepted

Sort by
1
Accepted
Ivan Danchev
Telerik team
answered on 17 Oct 2018, 06:56 AM
Hello Dan,

Thank you for reporting this behavior. We logged it for fixing. Here's the respective issue on our Github repo. 

There is a way to set the TextBox format initially through HtmlAttributes, e.g.,:
@Html.Kendo().TextBoxFor(model => model.ProductID).Name("test1").HtmlAttributes(new { @Value = String.Format("{0:C}", Model.ProductID) })

I updated your Telerik points for reporting this issue.

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or