Column Definition
The columns array is the blueprint of your grid. Each object in the array defines how a data field should be rendered and interacted with.
GridColumn API
Unique identifier for the column. Maps to data fields.
Display label shown in the header.
Fixed width in pixels.
Allows column to grow and fill available space.
Enables manual column resizing by dragging.
Allows sorting by clicking the header.
Configures the column filter type (text, select, etc).
Simple function to format value for display.
Advanced custom React component renderer for the cell.
Enables inline editing for this column.
Horizontal alignment of cell content.
Custom Rendering
There are two ways to customize cell display. formatter is best for strings (currency, dates).cellRenderer is for complex React components (avatars, buttons, badges).
{
key: "salary",
header: "Pay",
formatter: (v) => `$${v.toLocaleString()}`,
cellRenderer: (v) => (
<div className="flex items-center gap-2">
<div className="w-2 h-2 rounded-full bg-green-500" />
<span>$${v.toLocaleString()}</span>
</div>
)
}