Skip to main content

Row buttons

You can get access to the cell or the entire row using the formatter function. In this example, we are adding a button to each row which has an onClick handler function that can read the entire row.

Import the h function first:

import { Grid, h } from "gridjs";

Then you can use that in formatter function or directly in data array:

Live Editor
Result
Loading...

tip

It is also possible to bind callback functions to cellClick or rowClick events. See Events for more details.