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

Dynamic Min/Max value

5 Answers 1263 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Ladislav
Top achievements
Rank 1
Ladislav asked on 05 Oct 2015, 07:49 AM

I made an example that use NumerticTextbox and the Min/Max value can be changed if the button "Change Min/Max" clicked
Please see my example at http://dojo.telerik.com/ufeyU

Explain:

when the button was clicked, i expected that the validation range will be changed, but it s not.

Question: 

Is it possible to use NumericTextBox to validate a range that can be changed on the fly.

5 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 06 Oct 2015, 12:18 PM
Hello Ladislav,

In order to change the min and max properties of the NumericTextBox in your example, you need to set either the minValue or maxValue variables to the k-rebind attribute:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Shameer
Top achievements
Rank 1
answered on 03 Oct 2016, 09:29 PM

Hi,

  I have similar scenario , But need to bind both minValue and maxValue dynamically in the Numeric TextBox .Please let me know is there any way to achieve this ?

Thanks,

Shameer

0
Konstantin Dikov
Telerik team
answered on 04 Oct 2016, 08:03 AM
Hi Shameer,

Please refer to the following help topic for details regarding the k-rebind and how you can use it to watch for multiple options:
Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Tom
Top achievements
Rank 1
answered on 31 Jul 2018, 08:07 AM

Can you not just do this?

$('#NumericTextBox').data('kendoNumericTextBox').options.min = 1

$('#NumericTextBox').data('kendoNumericTextBox').options.max = 10

0
Alex Hajigeorgieva
Telerik team
answered on 02 Aug 2018, 05:41 AM
Hi, Tom,

While some widgets will update their options by assigning new ones, others will not. This is why the recommended way and the safest from unexpected behaviours point of view is to change the options of widgets in the context of AngularJS is with the "k-rebind" attribute as my colleague has shared.

 As far as the jQuery Kendo UI widgets are concerned, they have a setOptions() method or a setDataSource() method for the dataBound widgets which should be used.

Let us know if further questions arise.

Regards,
Alex Hajigeorgieva
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
NumericTextBox
Asked by
Ladislav
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Shameer
Top achievements
Rank 1
Tom
Top achievements
Rank 1
Alex Hajigeorgieva
Telerik team
Share this question
or