RealGrid2 Tutorial
React Component Tutorial
Apply grid renderer

Applying Grid Renderer

To use the renderer function in the grid, you can use the function by passing the renderer property you want to apply to the renderer props of the column tag to which you want to apply the renderer.

Below is a simple example code that applies an image renderer.

return (
    <div style={{ width: "100%", height: "550px"}}>
         <RealGridReact
            ref={gridRef}
            autoGenerateField={true}
            gridProps={{display: {rowHeight: 80}}}
            rows={[
                ["KRW"], ["USD"]
            ]}
        >
            <RGDataColumn
                fieldName='Monetary'
                renderer={{
                    type: 'image',
                    imageCallback: (grid: RealGrid.GridBase, cell: RealGrid.GridCell) => {
                        return `${cell.value}.png`
                    },
                    imageHeight: 50,
                }}
            />
        </RealGridReact>
    </div>
);

Renderer

You can check how to apply the renderer in Image Renderer Example.