This question is locked. New answers and comments are not allowed.
It seems that the logic used when a value is set by hand, and the
logic used with the client Api is used is slightly different.
Say I have a numeric Textbox on the page. Like this:
And I make an API call:
The field will be set to a null value, and no valueChange event will fire.
On the other hand, if I type in by hand, and blur. The textbox will change itself back to 12, and fire off two valueChange events. One for the set to 128, and the other for itself autocorrecting to 12.
I found that if I modify the file telerik.textbox.js and comment out these lines (Approx around line 423) that the api works as expected. But I'm not sure what I'm breaking by doing that.
Say I have a numeric Textbox on the page. Like this:
@(Html.Telerik().NumericTextBox() .Name("SomeField") .MaxValue(12) .MinValue(1) .DecimalDigits(0) .EmptyMessage(""))And I make an API call:
$("#SomeField").data("tTextBox").value(128);The field will be set to a null value, and no valueChange event will fire.
On the other hand, if I type in by hand, and blur. The textbox will change itself back to 12, and fire off two valueChange events. One for the set to 128, and the other for itself autocorrecting to 12.
I found that if I modify the file telerik.textbox.js and comment out these lines (Approx around line 423) that the api works as expected. But I'm not sure what I'm breaking by doing that.
if (!this.inRange(parsedValue, this.minValue, this.maxValue)) { parsedValue = null;}