How to change the value of a kendo bound html input

后端 未结 2 1995
醉梦人生
醉梦人生 2020-12-20 14:25

I have a kendoui grid with a custom popup for editing.

In this popup I have an input which is bound to a value of the grid:



        
相关标签:
2条回答
  • 2020-12-20 15:11

    I tried the above answer but did not work for me. Although the value had indeed changed, the view did not reflect that fact. This worked for me:

           var myvar = $("#myid").data("kendoNumericTextBox");
           myvar.value("newValue");
           myvar.trigger("change", { value: myvar.value() });
    
    0 讨论(0)
  • 2020-12-20 15:21

    You need simulate change event. Try this code:

    $('#test').val("testvalue").change();
    
    0 讨论(0)
提交回复
热议问题