'Uncaught TypeError: $(…).dxWidget is not a function' error occurs
This section explains an issue and steps to diagnose and resolve it. If the solution does not work, submit a ticket in our Support Center.
Issue
The browser fails to render DevExtreme components on the page. Browser console displays the following errors:
- “Uncaught TypeError: $(…).dxSelectBox is not a function”
- “Uncaught TypeError: $(…).dxDataGrid is not a function”
- “Uncaught TypeError: $(…).dxButton is not a function”
Solution
Ensure only one jQuery reference exists before
dx.all.js
in the root view, such as_Layout.cshtml
. For more details, refer to the following help topic: Add DevExtreme to a jQuery Application.Do not reference the jQuery script on child pages, such as
ViewXXX.cshtml
, where DevExtreme components exist.
The following help topics show the correct script order: