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

IntegerTextBox

1 Answer 334 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Gusev
Top achievements
Rank 1
Gusev asked on 29 Mar 2013, 07:01 AM
Hello!
I use IntegerTextBox
I use this 
@helper RenderConfigPlan()
 
....
<tr class="k-header">
                         <td>@Html.LabelFor(x => x.minProfit)</td>
                         <td>@Html.EditorFor(x => x.minProfit, "Integer")</td>
 </tr>
}
and I see next:
"minProfit" , which located at the top of the page with  IntegerTextBox from Kendo
and another "minProfit", where it should be, but  with IntegerTextBox from Asp

Why is this happening?(because of @RenderConfigPlan())

1 Answer, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 02 Apr 2013, 07:27 AM
Hello Gusev,

I assume that the problem is the editor inputs are generated with the same ID. And since the initialization script looks something like this:

$("#minProfit").kendoNumericTextBox();

jQuery will return the first element in the DOM and initialize NumericTextBox from it.

So in order to avoid this you should use different names for the input elements.

Kind Regards,
Petur Subev
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
Gusev
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or