Installing DataTables Plus

DataTables Plus licensing is managed via a key, which is unique to your purchase (or trial) and must be registered on your page / app before DataTables is used using the DataTable.key() function. There are a number of occasions when you might need to set a key, or update an existing key:

  • Purchased a license
  • Purchased a renewal license
  • Started a trial

Your license keys are always available on your account page, as well as other information such as invoices, billing details, etc.

You do not currently have a DataTables Plus license. To start a trial, visit the download page and click the button to start a trial, or you can purchase a license.

Using a license key:

Installation of DataTables Plus is done in exactly the same way as with the base DataTables software - use the download builder!. Select the components you want, including the "Plus" extensions, and then install them using the method that you wish to use (CDN, download, npm, etc).

The key difference for DataTables Plus is, as mentioned above, that you must register your license key so DataTables can validate the license. This is done with the DataTable.key() method:

// License key
DataTable.key('plus_5_20290521:GL6ZSk1KdScK...');

// Use DataTables and the DataTables Plus features!
const table = new DataTable('#myTable', {
    // Configuration options
});

Central file

It is very much recommended that when you use DataTables Plus components over multiple files (as will be the case in the majority of projects), that you store the license key and call DataTable.key() in just a single file, and include / import that file. The reason for this is that when it comes time to upgrade, then you need only change the key in a single location!

For example, if you are using ES modules / Typescript:

import DataTable from 'datatables.net-dt';
import Editor from 'datatables.net-editor-dt';
import './dt-plus';

Where dt-plus.js contains simply:

// License key
DataTable.key('plus_5_20290521:GL6ZSk1KdScK...');

Updating from trial

When you have purchased a license and wish to switch from using a trial key to the purchased license key, simply replace the trial key with the new licensed key. No other changes are required and it will not effect the data being displayed or modified by DataTables and its extensions.