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

Numeric text box format in custom editor

2 Answers 478 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 31 Oct 2019, 11:22 AM

The new filter is what I have been waiting for - thank you. However, I have created a custom editor as I want to search for a number in an id field, i.e. 922 instead of "922". I am using the following:

 function RiskIdEditor(container, options) {
  $('<input data-bind="value: value" name="' + options.field + '"/>')
   .appendTo(container)
   .kendoNumericTextBox();
 }

but this defaults to include 2 decimal places, e.g. 922.00. How do I force the numeric text box to display whole numbers only?

Thanks,

Jonathan

2 Answers, 1 is accepted

Sort by
0
Jonathan
Top achievements
Rank 1
answered on 31 Oct 2019, 10:44 PM
Please ignore this post. This is not an issue for me.
0
Viktor Tachev
Telerik team
answered on 04 Nov 2019, 09:01 AM

Hello Jonathan,

You can specify the number of decimals used in the NumericTextBox widget by configuring the decimals option. When it is set to zero there will be no decimals shown in the input.

 

Regards,
Viktor Tachev
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
Filter
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Jonathan
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or