var widgetObject = kendo.widgetInstance(widgetElement);
or...
var widgetObject = kendo.widgetInstance(widgetElement, kendo.ui);
Is the second parameter optional?
2 Answers, 1 is accepted
0
Accepted
Kamen Bundev
Telerik team
answered on 05 Mar 2014, 07:03 AM
Hello Rick,
Yes, the second argument is optional - if omitted, widgetInstance uses all 3 namespaces available in Kendo UI, in this order: kendo.ui, kendo.dataviz.ui, kendo.mobile.ui. As of Q1 2014 you will be also able to pass an Array of namespaces as the second parameter, in case you wish to pass only two namespaces or in different order. Order matters, as in Kendo UI Web and Mobile there are widgets which share the same name (mostly matters for kendo.init and kendo.bind), or you might have several widgets initialized on one element and widgetInstance returns only one Widget - the one it finds first.
Regards,
Kamen Bundev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!