Hi Eric,
Greetings from Syncfusion support.
From your query we suspect that you want to render the checkbox in the Gird cells with default value as false. You can achieve this requirement by using the columnTemplate feature of the Grid.
Please refer the below code example and sample for more information.
. . .
import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
export class Default extends SampleBase {
checkboxTemplate (args) {
return (<CheckBoxComponent checked={false} ></CheckBoxComponent>
);
}
render() {
return (
<div className="control-pane">
<div className="control-section">
<GridComponent dataSource={orderDetails} height="350">
<ColumnsDirective>
. . .
<ColumnDirective
headerText="checkbox"
template={this.checkboxTemplate.bind(this)}
width="150"
/>
</ColumnsDirective>
</GridComponent>
</div>
</div>
);
}
}
render(<Default />, document.getElementById('sample')); |
More information about EJ 2 CheckBox can be found in the below documentation link.
To proceed further on your requirement, please ensure the below details
- Do you want the checkbox to be rendered based on the data source values or only for display?
- “the checkbox must return a boolean value” – this query, do you want to render the checkbox while editing (single click or double click)
- Do you want to update the row value based on the checkbox change.
- Please share your exact your requirement.
Regards,
Manivel