<TreeViewComponent ref={(scope) => { this.treeviewObj = scope; }} fields={this.state.fields} nodeTemplate={this.nodeTemplate} cssClass={this.cssClass}/>
nodeTemplate(data) {
return (<div>
<div className='ename'>{data.name}</div>
<ButtonComponent>{data.job}</ButtonComponent>
</div>);
}
|
nodeTemplate(data) {
return (<div>
<div className='ename'>{data.name}</div>
<CustomComponent />
</div>);
}
|
<ButtonComponent onClick={this.UpdateDatasource.bind(this)} cssClass="e-primary">Update Datasource</ButtonComponent>
UpdateDatasource() {
this.treeviewObj.fields.dataSource = this.employees1;
}
|