Get a Widget Instance
IMPORTANT
According to Stack Overflow Trends, MVVM frameworks such as Angular, Vue, and React became more popular than Knockout in recent years. DevExtreme will continue to support Knockout but we recommend that you use one of these frameworks in your new projects.
To get a widget instance, save it in a view model property once the widget is initialized:
JavaScript
var viewModel = { menuInstance: {}, menuOptions: { // ... onInitialized: function (e) { viewModel.menuInstance = e.component; } } }; ko.applyBindings(viewModel);
Alternatively, you can apply techniques from the jQuery article.
See Also
Feel free to share demo-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you!
We appreciate your feedback.
We appreciate your feedback.