export class CheckboxSelection extends SampleBase {
constructor() {
super(...arguments);
this.selectionsettings = { mode: "Row", type: "Multiple" };
}
render() {
return (<div className='control-pane'>
<GridComponent dataSource={data} ref={grid => this.gridInstance = grid} allowPaging={true} selectionSettings={this.selectionsettings} allowSorting={true} allowFiltering={true}>
<ColumnsDirective>
<ColumnDirective type='checkbox' width='50'></ColumnDirective>
<ColumnDirective field='OrderID' isPrimaryKey={true} headerText='Order ID' width='120' textAlign="Right"></ColumnDirective>
. . .
</ColumnsDirective>
<Inject services={[Page, Sort, Filter]} />
</GridComponent>
</div>
</div>);
}
}
render(<CheckboxSelection />, document.getElementById('sample')); |