A newer version of this page is available. Switch to the current version.

DevExtreme jQuery - Call Methods

AngularJS is now in Long Term Support. You can continue to use it in existing projects but we recommend Angular, Vue, React, or another framework for new projects.

To call a widget method, apply the techniques described in the Call Methods topic for jQuery.

As an alternative, you can save the widget instance in a scope property once the widget is initialized...

function Controller ($scope) {
    $scope.menuInstance = {};
    $scope.menuOptions = {
        // ...
        onInitialized: function (e) {
            $scope.menuInstance = e.component;    
<div ng-controller="Controller">
    <div dx-menu="menuOptions"></div>

... and call any method of the saved instance afterwards.

See Also
  • API Reference.WidgetName.Methods, for example, API Reference.Menu.Methods