Skip to main content

Edit a cell

Use the interface to focus a cell, then begin editing a cell.'

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,
});

app.append(gridElement);

grid.scrollIntoView(2, 3);
grid.beginEditAt(2, 3);