<ReactDataGrid />
component props/state and restore them later. In the example below, we demo saving and restoring the column order, column size and sortInfo.<ReactDataGrid />
configured with a checkbox column for selection.checkboxColumn.renderCheckbox
prop, you have a custom render function for all checkboxes (both the header and row checkboxes). Overriding just the header checkbox is done via a check for the cellProps.headerCell
boolean flag.renderCheckbox
function), return undefined
.<ReactDataGrid />
you can build an Excel-like experience pretty easily. The example below demonstrates how you can use the Tab
key to navigate between cells (arrow keys also work). To enter edit mode, hit Space
or Enter
.<ReactDataGrid />
you can retrieve the edit value lazily, by using columns.getEditStartValue
. In the snippet bellow, the NAME
column retrieves the edit value lazily (with a delay of 250 ms).render
function) - see the COUNTRY
column in the example.<ReactDataGrid />
you can have columns that use their render
function to render an already visible editor. In this case, make sure you specify rendersInlineEditor=true
for the column. When the column editor is focused, it starts the edit (so it saves the user a double click on the cell in order to start editing). The editor also participates in the edit keyboard navigation flow.<ReactDataGrid />
contents as a CSV file. It keeps the sort order and the column order.renderRow(rowProps)
or onRenderRow(rowProps)
you can attach custom DOM events to grid rows.rowProps
argument passed to renderRow
(and to onRenderRow
) contains information about the rowIndex, the row data object and more.onClick
prop on this rowProps
object, make sure you still call the default onClick that rowProps
already has (similarly, you should do this will all other event handlers).