kendo.widgetInstance throws exception TypeError: t is undefined

前端 未结 1 1801
无人及你
无人及你 2021-01-28 09:51

I\'m trying to use kendo.widgetInstance() to get an instance of a kendo control:

$.each($(\'#AttributeForm\').find(\':input\'), function(index, element) {
    if         


        
相关标签:
1条回答
  • 2021-01-28 10:41

    The documentation is incorrect, at least for this version of Kendo UI. kendo.widgetInstance requires a second parameter (the documentation currently states this parameter is optional). Depending on whether you use Web or Mobile, the necessary parameter is kendo.ui or kendo.mobile.ui. So you need to change your call to:

    var widgetObject = kendo.widgetInstance(widgetElement, kendo.ui);
    

    See it work: http://jsfiddle.net/lhoeppner/798Rd/

    0 讨论(0)
提交回复
热议问题