Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148132 | Oct 7,2019 04:28 PM UTC | Oct 15,2019 08:57 AM UTC | React - EJ 2 | 3 |
![]() |
Tags: Grid |
[Parent.js]
import './App.css';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
. . . .
class Parent extends React.Component {
constructor(props) {
super(props);
. . . .
};
gridTemplate(props) {
// We have bnd the button on template column
return (<div className='custId'>
<ButtonComponent cssClass='e-primary' content={props.CustomerID} onClick={this.templateBtnClk} ></ButtonComponent>
</div>);
}
columns = [
. . . .
];
templateBtnClk(args) {
// you can bind the Modal pop-up here
}
componentDidMount() {
this.gridInstance.columns[3].template = this.gridTemplate.bind(this); // Define the template column for dynamic columns scenario
}
render() {
return (
<div className="Parent" >
<div className='control-section'>
<GridComponent ref={grid => this.gridInstance = grid} dataSource={orderData} allowFiltering={true} allowPaging={true} allowSorting={true}
toolbar={this.toolbarOptions} allowSelection={true}
editSettings={this.editOptions} columns={this.columns}>
<Inject services={[Filter, Page, Edit, Toolbar, ExcelExport, PdfExport, Sort]} />
</GridComponent>
</div>
</div>
);
}
}
export default Parent;
|
let coldef = {"field":"Included","headerText":"Included","allowEditing":true,"type":"boolean","editType":"booleanedit","displayAsCheckBox":"true"}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.