|
[index.js]
this.childGrid = {
dataSource: orderDatas,
queryString: 'EmployeeID',
allowPaging: true,
pageSettings: { pageSize: 6, pageCount: 5 },
columns: [
. . . .
],
};
}
return (<div className='control-pane'>
<div className='control-section'>
<GridComponent dataSource={this.localdata} ref={g=>this.grid=g} childGrid={this.childGrid} allowSorting={true} toolbar={this.toolbarOptions} allowPaging={true} editSettings={this.editSettings} beforeBatchAdd = {this.beforeBatchAdd.bind(this)} beforeBatchSave = {this.beforeBatchSave.bind(this)} >
<ColumnsDirective>
<ColumnDirective field='OrderID' headerText='Order ID' isPrimaryKey='true' width='125' textAlign='Right' type="number"/>
<ColumnDirective field='FirstName' headerText='Name' width='125' type="string"/>
<ColumnDirective field='Title' headerText='Title' width='180' type="string"/>
<ColumnDirective field='EmployeeID' headerText='Employee ID' width='125' textAlign='Right' type="number"/>
<ColumnDirective field='ReportsTo' headerText='Reports To' width='135' type="string" textAlign='Right'/>
</ColumnsDirective>
<Inject services={[DetailRow, Page, Sort,Edit, Toolbar]}/>
</GridComponent>
|
|
beforeBatchSave(e){
this.grid.showSpinner();
}
actionComplete(e){
if(e.requestType == "batchsave"){
console.log("Saved....");
this.grid.hideSpinner();
}
} |