export class Hierarchy extends SampleBase {
constructor() {
this.childGrid = {
dataSource: hierarchyOrderdata,
queryString: 'EmployeeID',
editSettings:{allowEditing:true,allowDeleting:true},
columns: [
{field:"Verified",type:"boolean",displayAsCheckBox:true,width:150,editType:"booleanedit"},
{ field: 'OrderID', headerText: 'Order ID', isPrimaryKey:true,textAlign: 'Right', width: 120 },
. . .
]
};
}
render() {
return (<div className='control-pane'>
<div className='control-section'>
<GridComponent dataSource={employeeData} childGrid={this.childGrid} >
<ColumnsDirective>
. . .
</ColumnsDirective>
<Inject services={[Edit, DetailRow ,Toolbar, Page]}/>
</GridComponent>
</div>
</div>);
}
}
render(<Hierarchy />, document.getElementById('sample')); |