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

about inital value

0 Answers 176 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Ozge
Top achievements
Rank 1
Ozge asked on 23 May 2012, 07:45 AM
I need a numerictextbox whose initial value seems '0' but when first up/down button hit, the real initial value will come.
Is it possible to do that?
I try the code below but on spin event when e.sender._value is set to firstPrice, change event is called and i can see that e.sender._old value is still the unchanged value.
$("#txtPrice").kendoNumericTextBox({
                decimals: 5,
                step: 0.00001,
                format: '#.00000',
                min: 0
            });
var firstPrice = 0.89889;
var numeric = $("#txtPrice").data("kendoNumericTextBox");
            numeric.bind("change", function (e) {
                if (e.sender._old == 0)
                    e.sender._value = firstPrice;
            });
            numeric.bind("spin", function(e) {
                if (e.sender._old == 0)
                    e.sender._value = firstPrice;
            });
 
 
<asp:TextBox ID="txtPrice" runat="server" ClientIDMode="Static" Text="0"></asp:TextBox>

No answers yet. Maybe you can help?

Tags
NumericTextBox
Asked by
Ozge
Top achievements
Rank 1
Share this question
or