How can I refresh value kendo numerictextbox?

假装没事ソ 提交于 2019-11-30 17:37:51
var numerictextbox = $("#paymentAmount_" + id).data("kendoNumericTextBox");
    numerictextbox.value("0.00");

This works for me. Store the element in a variable and the set the value using double quotes. Also I was not able to put a word in like 'test' in a numericTextBox...I am assuming you meant that as test data. But this should work for you as well.

i was having trouble with this same thing, I However got it working without the quotes...
all that i can say is that it seems to work for now....

 calCalories: function (e) {

        var totalCals = 0;
        totalCals = totalCals + ($("#Carbs").val() * 4);
        totalCals = totalCals + ($("#Protein").val() * 4);
        totalCals = totalCals + ($("#Fat").val() * 9);

        var numerictextbox = $("#Calories").data("kendoNumericTextBox");
        numerictextbox.value(totalCals);
    },

note: one could obviously use the below line of code to get the value from the event

e.sender.value()
GuChil

Just trigger change event for kendo numeric textbox

$('#myId').data('kendoNumericTextBox').trigger('change');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!