This is a migrated thread and some comments may be shown as answers.

kendo.widgetInstance() parameters

2 Answers 176 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 04 Mar 2014, 04:15 PM
With regard to the documentation found at:

http://docs.telerik.com/kendo-ui/getting-started/widgets

Is it...

var widgetObject = kendo.widgetInstance(widgetElement);

or...

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

Is the second parameter optional?

2 Answers, 1 is accepted

Sort by
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!
0
Rick
Top achievements
Rank 1
answered on 18 Mar 2014, 01:50 PM
Excellent... very helpful!
Tags
General Discussions
Asked by
Rick
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Rick
Top achievements
Rank 1
Share this question
or