Row identifiers
Custom Row Identifiers in DatagridCore
Some core functionalities within DatagridCore assume a default way of identifying rows — specifically, using row.id.
However, this may not always be the case. In many datasets, the unique key for a row may be found in a different field or even constructed from multiple fields.
To handle this scenario, DatagridCore allows you to override the default row identifier behavior by providing a custom rowIdGetter function in the config.
The rowIdGetter
Function
This function lets you define how each row should be uniquely identified.
Example: Using a Custom Row Identifier
In the example above, rows are uniquely identified using a combination of the name and category fields.
⚠️ Important:
Ensure that yourrowIdGetter
function always returns a unique and stable identifier for each row. This is critical for correct selection, updating, and internal tracking within the datagrid.
API Reference
For a complete list of available methods and usage details, refer to the API Reference documentation.