Skip to content

License key ​

Without a key, or with a key that does not match, the grid still works. The only differences are a one-line watermark at the bottom of the grid and one console warning. This is called evaluation mode. Set the key before you put the page into production.

Key checking happens inside the bundle. It makes no network request and sends no usage data, so it behaves the same on a closed corporate network.

You get a key from the store, by buying a license or taking a Trial. Editions and prices are on Pricing and editions, and the setup below works as written once you have a key.

Set the key ​

A key is a single string that starts with MXG1.. There are two ways to set it. If you use both, the grid option wins over the global setting.

WayWhere it works
Grid option licenseKeyJavaScript, React, Vue and Angular
Global MaxGrid.config({ licenseKey })JavaScript (the maxgrid package) only
tsx
import { Grid, type GridOptions } from '@maxgrid/react';

const options: GridOptions<Employee> = {
  columns,
  rows,
  rowKey: 'id',
  licenseKey: 'MXG1.eyJ2Ijox…',
};

export const EmployeeGrid = () => <Grid options={options} />;

The React, Vue and Angular wrappers have no global setting, so pass the key as an option to each grid. Keep the key in one constant and spread it where you build the options, and no grid is missed.

With plain JavaScript, set it once globally and every grid created afterwards uses it. Grids that already exist are checked again with the new key, and the watermark is removed if the key is valid.

html
<script src="https://cdn.maxmine.com/maxgrid/1.8.0/maxgrid.min.js"></script>
<script>
  MaxGrid.config({ licenseKey: 'MXG1.eyJ2Ijox…' });
  // Another name for the same thing. Pass undefined to clear the key.
  // MaxGrid.setLicenseKey('MXG1.eyJ2Ijox…');

  MaxGrid.createGrid(document.getElementById('grid'), { columns, rows, rowKey: 'id' });
</script>
  • A value that is not a string throws a TypeError before anything changes.
  • Whitespace and line breaks inside the key are ignored. You can paste a key that an email client wrapped onto several lines.
  • The key ships in your page as is. It is not a secret. It is a signed statement of the conditions below.
  • The modular bundles (maxgrid.core.min.js, maxgrid/core) have the same config and license() (Pick features).

What changes in evaluation mode ​

Below, a grid with a key and a grid without one are shown one above the other. The top one is drawn with this site's showcase key, the bottom one without a key. You can read the status with licenseStatusChanged too.

Live demo — drawn by the real renderer

Two things change.

  • Watermark: a one-line strip at the bottom of the grid reads MaxGrid evaluation mode · License key required. It is in Korean unless the locale option is English. It sits directly below the grid and takes its own space (25 px), so it never covers rows, summary rows or the pager. The grid becomes that much shorter (with a fixed container height, grid plus strip add up to the container height). It does not intercept clicks, selection, editing or keyboard input.
  • Console warning: a warning for the same reason and host appears once per page. It is one Korean line and one English line, with the reason code and how to fix it. The key string is never printed.

If you delete the watermark in the developer tools or hide it with CSS, it comes back.

Features do not change. There is no limit on rows, sorting, filtering, editing or performance. Evaluation mode is only a visible signal that the key needs attention.

No key is needed while you develop ​

An address of localhost, *.localhost (for example app.localhost), 127.0.0.1 or [::1] is a development host. There is no watermark and no warning there, with or without a key.

Every other address counts as production. That includes 127.0.0.2, 0.0.0.0, private IPs (192.168.x.x, 10.x.x.x), *.local, *.test and files opened with file://. If your internal development server uses such an address, ask for a key that lists that host as a domain.

On a development host, a key with a problem still works, but the console shows one warning that it will be in evaluation mode in production. That is so you notice before you deploy.

What a key is tied to ​

A key carries the conditions below, signed. Edit any value and the signature no longer matches, so the key cannot be read.

ConditionMeaningIf it does not match
DomainThe host of the page that shows the grid. A key for example.com covers example.com and www.example.com only. Subdomains such as app.example.com are separate domainsdomain-mismatch
Framework typeOne of vanilla (JavaScript), react, vue, angular that the key listsframework-mismatch
Update windowVersions built up to this date keep working. Versions built later run in evaluation moderelease-too-new
ExpiryTrial keys only. The last day you can use ittrial-expired

Domain ​

The host is lowercased and compared without the port and trailing dot. It passes only if it exactly equals a name in the key. www. is treated as the same site, so an example.com key also works on www.example.com. Subdomains such as app.example.com, notexample.com and example.com.evil.io do not pass for an example.com key. If you need a subdomain, buy it as its own domain. If the key lists an IP, only an exact match passes.

Inside an iframe, the host of the top page is used. If cross-origin rules block reading it, the parent address (ancestorOrigins) is tried, then document.referrer. During server-side rendering (SSR) the host is unknown, but the server does not draw the grid, so nothing is affected.

If a staging or test server uses a different host from production, ask for a key that lists that host too. Trial keys are also tied to a domain.

Framework type ​

Each bundle reports its own type: maxgrid is vanilla, @maxgrid/react is react, @maxgrid/vue is vue, @maxgrid/angular is angular. A React key does not pass in a Vue app. One key can list several types. Trial keys skip the type check.

Update window ​

The date is compared with the build date of the version you use, not the date the key was made. A version built before the date keeps working after it passes. You only need a renewed key to move to a version built later. That is why production should pin a version in the URL (maxgrid@1.2.3). A latest URL can cross the window the moment a new build is published.

Check the status ​

The JavaScript bundle reports the current result through MaxGrid.license().

js
const info = MaxGrid.license();
console.log(info.status, info.edition, info.reason);
// 'evaluation' 'trial' 'domain-mismatch'
FieldValue
statusvalid (no watermark) or evaluation
editiondeveloper (no key, development host), trial, commercial, enterprise, or null
reasonReason code in evaluation mode. null when everything is fine
host, frameworkThe host and framework type used for the decision
domains, frameworksThe domains and types the key allows
maxRelease, buildDate, expiresEnd of the update window, build date of your version, Trial expiry
licensee, licenseId, keyId, partnerCustomer name, license ID, signing key ID and partner written in the key

The React, Vue and Angular wrappers have no license() function. Listen for the licenseStatusChanged event instead. It fires once right after the grid is created, and afterwards only when the result changes.

ts
api.on('licenseStatusChanged', ({ status, edition, reason }) => {
  if (status === 'evaluation') reportToMonitoring(reason);
});

In a wrapper, React receives it as the onLicenseStatusChanged prop, Vue as @licenseStatusChanged, and Angular through (gridEvent) (Receive events). It lets monitoring tell you when production slipped into evaluation mode.

Error states and fixes ​

The console warning and the reason value are one of the seven states below. The reason code is also printed on the English line.

StatereasonCauseFix
No keyno-keyNo key was setSet it as in Set the key. While developing, open the page on localhost
Key cannot be readmalformed, bad-signature, invalid-payloadThe key was cut off or changed while copying. An edited key also lands herePaste the whole key again, from the first to the last character
Key unknown to this buildunsupported-version, unknown-key-idThe key was made after this build (including after a signing key rotation)Update MaxGrid to a newer version
Expiredtrial-expired, release-too-newThe Trial expiry passed, or your version was built after the key's update windowThe warning shows the date. Replace a Trial key with a full key. For the update window, renew the key or pin a version built inside it
Wrong domaindomain-mismatchThe current host is not in the key's domainsCompare the host in the warning with the allowed domains. Ask for a key that adds the host you need, such as staging
Key without the Ganttmodule-not-licensedYou use the Gantt (@maxgrid/gantt) but the key does not include it (a grid-only key)Switch to a MaxGrid + Gantt key. The grid stays normal; only the Gantt is in evaluation mode
Wrong typeframework-mismatchYou use a framework package that the key does not listCheck the allowed types in the warning. Ask for a key whose type matches the package you use

For module-not-licensed the console prints two lines: the Korean line says the key does not include the Gantt (a MaxGrid + Gantt product is needed), and the English line shows the reason code with the fix "Upgrade to a key that includes the Gantt". The evaluation band over the Gantt reads "Gantt needs a MaxGrid + Gantt key". The band has Korean, English, Japanese and Simplified Chinese texts; the console text is Korean and English. A key without a modules entry counts as including the Gantt.

Outside the table there is internal-error (an exception while checking). A failing check never stops the page. It only drops to evaluation mode. If it keeps appearing, include the result of MaxGrid.license() when you contact support.

On a development host the same reasons show only as a warning. status stays valid and only reason is filled in.

Common pitfalls ​

The watermark stays after I added the key. Read reason from MaxGrid.license() first. The host is the most common cause. If the key is for example.com and you opened the page on app.example.com or staging.example.com, it does not pass because those are subdomains. Only www. counts as the same site. If the browser cached an old script, hard-reload.

The watermark shows only in production. Development hosts work without a key, so the problem shows up late. Check whether the console showed the warning about evaluation mode in production while you developed.

Only one of several grids is in evaluation mode. A grid's licenseKey option wins over the global key. Check that this grid does not carry a different key or an empty string.

What to include when you contact support. The licenseId, reason, host and buildDate from MaxGrid.license(), and the package name and version you use. You do not need to send the key string.