The Data Grid is a complex component that provides a wide range of features for displaying and interacting with data. It includes a variety of helpers to create an enhanced developer experience.
The DataGrid accepts any form of data structures. Data is not what drives the component - defined columns are. All that matters for your data is that it is typed.
Columns are the engine that run the Data Grid.
Columns are defined using the createColumnHelper. This will provide a strictly
typed interface for defining individual columns.
Pass in your data type to the createColumnHelper function and build your columns.
Once you have setup your helper singleton, you can start building columns.
There are three methods available to create columns:
display: Non-interactive columns.accessor: Interactive columns that utilize the features options.accessorFn: Interactive columns that allow your to define custom logic for rendering cells.You can learn more about the columns in on the Columns page.
The final step is to add the DataGrid component to your application. You simply pass in the data, columns, and any other feature-related props.
The next pages cover each feature in detail.