Dynamic Min/Max value

6 posts, 0 answers
  1. Ladislav
    Ladislav avatar
    32 posts
    Member since:
    Jan 2009

    Posted 05 Oct 2015 Link to this post

    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.

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 06 Oct 2015 Link to this post

    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!
     
  3. Shameer
    Shameer avatar
    2 posts
    Member since:
    Feb 2016

    Posted 03 Oct 2016 in reply to Konstantin Dikov Link to this post

    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

  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 04 Oct 2016 Link to this post

    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.
     
  5. Tom
    Tom avatar
    10 posts
    Member since:
    Sep 2017

    Posted 31 Jul 2018 Link to this post

    Can you not just do this?

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

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

  6. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    725 posts

    Posted 02 Aug 2018 Link to this post

    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.
Back to Top