Script Registration
- 2 minutes to read
Required Script Libraries
Reporting components for web require the following client-side script libraries for correct operation:
- jQuery 1.11.3+
- jQuery UI 1.11.4+ Include the
core
,widget
,mouse
,draggable
,resizable
, andselectable
modules, and both JavaScript and CSS files. - knockout 3.5.0+
Optional. globalize v1.1.1+ Include the
cldr
scripts first:cldr
cldr.event
cldr.supplemental
Next, include the
globalize
scripts:number
currency
date
message
- ace.js 1.1.9 This library is required for the Web Report Designer and Query Builder. Include the
ext\-language\_tools
script. - dx.all.js. You should also include the
dx.common.css
stylesheet along with the theme stylesheet:dx.light.css
ordx.dark.css
.
Automatic Script Registration (ASP.NET WebForms & MVC)
You can register both Third-Party and DevExtreme libraries automatically in the Web.config
file (<resources>
section):
<configuration>
<devExpress>
...
<resources>
<add type="ThirdParty" />
<add type="DevExtreme" />
</resources>
</devExpress>
</configuration>
Manual Script Registration
ASP.NET WebForms & MVC
To include both Third-Party and DevExtreme libraries manually, leave the resources
section in the Web.config
file empty.
The empty resources
section of your Web.config
file should appear as follows to disable automatic registration:
<configuration>
<devExpress>
...
<resources>
</resources>
</devExpress>
</configuration>
All Web Platforms
Include script libraries in the HTML page header section with the <script\>
tags, as shown in the following code snippet. Note that the order in which scripts are registered is important.
<html>
<head>
<script src=".../jquery.min.js" type="text/javascript"></script>
<link href=".../jquery-ui.css" rel="stylesheet" type="text/css" />
<script src=".../jquery-ui.min.js" type="text/javascript"></script>
<script src=".../cldr.js" type="text/javascript"></script>
<script src=".../event.js" type="text/javascript"></script>
<script src=".../supplemental.js" type="text/javascript"></script>
<script src=".../globalize.js" type="text/javascript"></script>
<script src=".../number.js" type="text/javascript"></script>
<script src=".../currency.js" type="text/javascript"></script>
<script src=".../date.js" type="text/javascript"></script>
<script src=".../message.js" type="text/javascript"></script>
<script src=".../knockout.js" type="text/javascript"></script>
<script src=".../ace.js" type="text/javascript"></script>
<script src=".../ext-language_tools.js" type="text/javascript"></script>
<link href=".../dx.common.css" rel="stylesheet" type="text/css" />
<link href=".../dx.light.css" rel="stylesheet" type="text/css" />
<script src=".../dx.all.js" type="text/javascript"></script>
...
</head>
...
</html>
Note
Insert correct paths to script libraries after you copy the code above to your application.
The empty resources
section of your Web.config
file should appear as follows to disable automatic registration:
<configuration>
<devExpress>
...
<resources>
</resources>
</devExpress>
</configuration>
Combination Script Registration (ASP.NET WebForms & MVC)
There is an option to register Third-Party libraries manually and have DevExtreme libraries registered automatically. To implement this option, register DevExtreme libraries in the resources
section of your Web.config
file:
<configuration>
<devExpress>
...
<resources>
<add type="DevExtreme" />
</resources>
</devExpress>
</configuration>
Note
DevExtreme requires that third-party libraries be included in the page before DevExtreme registration. This means that you cannot register DevExtreme libraries manually and Third-Party libraries automatically.