Usage
Signature:
interface GridItem<D>
Generic Parameters
Parameter Description D Type of Data
Typescript Import Format
//To use this interface, import as below.
import {GridItem} from "ojs/ojdatagridprovider";
For additional information visit:
Specifically for header labels this is the all that is contracted.
See GridHeaderItem and GridBodyItem for the header and databody return types.
Fields
-
data :D
-
The data property for the cell, header, or header label returned to the DataGrid from DataGridProvider.
Data can be any type, however there are some recommendations.
If data is a primitive type, the default DataGrid renderer will be able to render that plain string/number/boolean. If data is complex type, the default DataGrid renderer will likely be unable to render the complex object in a meaningful way. For this case supply a template or renderer for the DataGrid.
We recommend data be an object with any properties that your cell may need access to. Doing so will allow following the best editing practices and the best extensibility. In DataGrid demos you may find our samples show data is an object like
{data: string}
, but this is not required.- Since:
- 11.0.0
-
metadata :GridItemMetadata & {[propName:string]:any}
-
The metadata property for the cell, header, or header label returned to the DataGrid from DataGridProvider.
Metadata is an object that can be empty or have any keys. It is provided as a way to specify additional information about the cell that applications can access from contextual information about the cell.
Metadata has optional keys the DataGrid can interpret for headers only today, see GridItemMetadata, but this may be extended in the future.
- Since:
- 16.1.0