Highlights
Highlights usage
This guide is based on getting started .
Highlights allow you to alter arbitrary cells in the grid by applying custom CSS classes to them or by setting their border colours.
Import the
Highlight
interface
import { ReactGrid, Highlight } from "@silevis/reactgrid";
Define an array of
Highlight
objects
const highlights: Highlight[] = [
{ columnId: "Name", rowId: 1, borderColor: "#00ff00" },
{ columnId: "Surname", rowId: 2, borderColor: "#0000ff" },
{ columnId: "Name", rowId: 3, borderColor: "#ff0000" }
];
Pass the
highlights
object array to your component
return <ReactGrid rows={rows} columns={columns} highlights={highlights} />;