Lattice Grid Buy a licence

demo D141

Licence and the trial watermark

What an unlicensed grid does, and the loopback exemption

config.licence · grid.licence

Building…
Loading a live grid…

The configuration

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.css">
<script src="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.js"></script>

<div id="grid" style="height: 540px"></div>

<script>
  const grid = LatticeGrid.createGrid(document.getElementById('grid'), {
    rowKey: 'id',
    // Your key. Installed on the process-wide holder, so it sets the licence
    // state for the whole document. A licence removes the trial mark; every
    // feature is available either way, and localhost needs no key at all.
    licence: 'LG1...your-key',
    columns: [
      { field: 'question', title: 'Asked of the grid', layout: { width: 250, pin: 'start' } },
      {
        id: 'answer',
        title: 'Answer in your browser',
        layout: { width: 220 },
        sort: false,
        filter: false,
        // Read from the grid that is displaying it, so the readout cannot drift
        // from what this page is actually doing.
        value: {
          pure: false,
          deps: '*',
          compute: (_deps, ctx) => {
            const grid = ctx?.grid;
            switch (ctx?.data?.id) {
              case 1: return String(grid?.licence?.state?.() ?? 'no licence api');
              case 2: return String(grid?.licence?.watermark?.() ?? 'no licence api');
              case 3: return String(grid?.licence?.info?.()?.valid ?? 'no licence api');
              case 4: return String(grid?.licence?.info?.()?.reason ?? '(none)');
              case 5: return String(location?.hostname || '(no host)');
              case 6: return typeof LatticeGrid.isLocalHost === 'function'
                ? String(LatticeGrid.isLocalHost()) : 'not exported';
              case 7: return typeof LatticeGrid.licenceState === 'function'
                ? String(LatticeGrid.licenceState()) : 'not exported';
              default: return '';
            }
          },
        },
      },
      { field: 'meaning', title: 'What it means', layout: { flex: 1, min: 300 }, cell: { wrap: true } },
    ],
    rows,  // one row per licence probe, each naming an api call
  });
</script>

Trial watermarking and the domain licence

Lattice Grid is licensed per domain: a key issued for example.com validates on that origin and any subdomain, and the grid checks it once at construction rather than on every render. Without a matching key, or during evaluation, the grid still runs at full capability, but draws a diagonal watermark across the body and stamps one into CSV and Excel exports, so a trial build is obvious wherever it is used or shared, not just on screen. Reach for config.licence when embedding the key at build or deploy time, and for grid.licence when an application needs to set or replace it after the grid already exists, for instance in a multi-tenant admin tool that swaps keys per customer at runtime. A localhost and loopback exemption means development on 127.0.0.1 or localhost never shows the watermark regardless of licence state, so a missing or misconfigured key is caught in staging or production rather than on every developer’s own machine. The watermark itself is a layer drawn independently of row and column virtualisation, so it costs nothing per scroll frame and does not participate in cell recycling.

Does an unlicensed Lattice Grid stop working?

No. An unlicensed or trial grid keeps its full feature set: sorting, filtering, editing, export and every renderer behave identically to a licensed one. The only difference is a watermark overlaid on the grid and carried into CSV and Excel exports, set through config.licence or grid.licence. A valid domain key removes it; localhost and loopback origins are exempt while developing.