about inital value

1 posts, 0 answers
  1. Ozge
    Ozge avatar
    3 posts
    Member since:
    Feb 2012

    Posted 23 May 2012 Link to this post

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