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

How to make a dynamic input field as a numeric textbox ??

0 Answers 83 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Rasika
Top achievements
Rank 1
Rasika asked on 07 Sep 2015, 07:38 AM

I really don't know this question belongs to this category. But I think this will be most suitable place for this question.

Here is my situation.

I am making a dynamic form with a help of this article article.

Here you can see it use kendo template . 

      <script id="fieldsTemplate" type="text/x-kendo-template">
            <li>
                 <label data-bind="attr: { for: name}, text: label"></label>
                 <input data-bind="attr: { type: type, name: name, class: css}" # if (get("required")) {# required #} # />
           </li>
      </script>

 

After form generated this form is just use HTML5 make the form. It does't have kendo attribute. for a example if I bound data-role attribute and value is numerictextbox It doesn't give me a numeric text box(Think  its' type is number). It doesn't have those properties.( if I type a number it doesn't show the default decimal point. It only shows that number.)

But in this example says if we add data-role attribute and value as numerictextbox it will be a numeric text box.

But in documentation or in this , it seems I have to call kendoNumericTextBox method to make a numeric text box.

Even I try to add this code to template but it doesn't work(Please assume that I add this correctly with this ).

 

          $("#mytextboxid").kendoNumericTextBox();‚Äč

 

So what option do I left ??
Thank you very much.

No answers yet. Maybe you can help?

Tags
Ajax
Asked by
Rasika
Top achievements
Rank 1
Share this question
or