DevExtreme v23.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Destroy a Widget

To dispose of a DevExtreme widget, free up the allocated resources by calling the dispose() method. Then, remove the widget's associated DOM node:

JavaScript
$("#menuContainer").dxMenu("dispose");
$("#menuContainer").remove();