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

[Solved] Set Minimum Value of NumericTextBox using jscript

3 Answers 135 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dhaval
Top achievements
Rank 2
Dhaval asked on 08 Oct 2010, 08:47 AM
Hi All,
              I am using Integer TextBox and what i want to do is when the value of drop down changes on the basis of that value i want to set the minimum value of Integer TextBox.. I am getting the value but i am not getting how to set the minimum value for Numeric Textbox i tried using jQuery('#totalqty').tTextBox({minValue:'5'}) but it is not working..

       Waiting for the replies..

      Thankin in Anticipation

3 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 08 Oct 2010, 09:45 AM
Hello Dhaval,

You can achieve your goal like so:
jQuery('#totalqty').tTextBox().minValue = 5;

Best wishes,
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Dhaval
Top achievements
Rank 2
answered on 08 Oct 2010, 12:53 PM
Hi Georgi,
                  Thnx for your reply.. I tried the way you suggested but it is still not working.. here is my sample code
var optionDropDown = $('#optionid').data('tDropDownList');
            var debDropDown = $('#debentureid').data('tDropDownList');
            Url = '<%= Url.Action("_GetMinQty","DebentureEntry") %>';
            $.post(Url, { debentureid: fdDropDown.value(), optionid: optionDropDown.value()},function(data) {jQuery('#totaldebentureqty').tTextBox().minValue = data;}, "json");}
 
and also using
 
var optionDropDown = $('#optionid').data('tDropDownList');
            var debDropDown = $('#debentureid').data('tDropDownList');
            Url = '<%= Url.Action("_GetMinQty","DebentureEntry") %>';
            $.post(Url, { debentureid: fdDropDown.value(), optionid: optionDropDown.value()},function(data) {$('#totaldebentureqty').data('tTextBox').minValue = data;}, "json");}
here data is the integer value dat is returned as a jsonresult from action..
0
Dhaval
Top achievements
Rank 2
answered on 08 Oct 2010, 05:37 PM
Hi,
    I solved my problem using
$('#totaldqty').data('tTextBox').minValue=data;

  Thanx..
Tags
NumericTextBox
Asked by
Dhaval
Top achievements
Rank 2
Answers by
Georgi Krustev
Telerik team
Dhaval
Top achievements
Rank 2
Share this question
or