Skip to main content

Change a columns's title

Change a columns's title

import canvasDatagrid from 'canvas-datagrid';
import data from '/data.json';

const app = document.getElementById('app');
const gridElement = document.createElement('div');
const grid = canvasDatagrid({
  parentNode: gridElement,
  data,
  showNewRow: true,
});

app.append(gridElement);

grid.schema[0].title = 'foo';
grid.draw();