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

Disabling the group separator

4 Answers 289 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Joey
Top achievements
Rank 1
Joey asked on 24 Apr 2013, 01:41 PM
I'm using the MVC wrappers and I have a numeric text box that I'd really like to see without the "," group separator (e.g. 1937 should not be 1,937 as it's shown now). 

Is there anyway to do this in the MVC wrappers?

Thanks.

-Joe

4 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 26 Apr 2013, 12:43 PM
Hi Joe,

In order to achieve your goal you should specify the NumericTextBox's format. For example:

@(Html.Kendo().NumericTextBox()
  //....
  .Format("n0")
)
More detailed information about the formats in Kendo UI is available in the corresponding documentation.  Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joey
Top achievements
Rank 1
answered on 26 Apr 2013, 01:02 PM
Iliana, thanks!

Unfortunately, that particular format string "n0" left the group separator in the numeric text box.  I looked in the documentation but did not see a list of formats.  Do you know which is the correct format or where I can find the list of accepted formats?

Thanks.

-Joe Benckert
0
Joey
Top achievements
Rank 1
answered on 26 Apr 2013, 02:22 PM
Sorry, I didn't see the list of formats that you originally posted.  I've tried several different things but the group separator persists...

Here is my code:
@Html.Kendo().NumericTextBoxFor(model => model.VehicleYear).Format("n0")
0
Iliana Dyankova
Telerik team
answered on 30 Apr 2013, 11:03 AM
Hi Joe,

First of all, let me apologize - I didn't understand your requirement correctly. I believe the following format should help to achieve the desired result: 

@(Html.Kendo().NumericTextBoxFor(model => model.VehicleYear).Format("#.##")
//....

Let me know if this fits your requirements.
 
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
NumericTextBox
Asked by
Joey
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Joey
Top achievements
Rank 1
Share this question
or