Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142629 | Feb 12,2019 06:53 PM UTC | Feb 18,2019 12:18 PM UTC | React - EJ 2 | 7 |
![]() |
Tags: Grid |
[index.js]
actionComplete(args){
if(args.requestType == "batchsave"){
document.getElementById("externalbtn").disabled =false // Disabled external button while add and edit actions
}
}
toolBarClick(args){
if(args.item.text === "Add" || args.item.text === "Edit" ){
document.getElementById("externalbtn").disabled =true // Disabled external button while add and edit actions
} else if(args.item.text === "Cancel"){
document.getElementById("externalbtn").disabled =false; // Disabled external button while add and edit actions
}
}
|
[indx.js]
toolBarClick(args){
if(args.item.text === "Add" || args.item.text === "Edit" ){
document.getElementById("externalbtn").disabled =true
} else if(args.item.text === "Cancel"){
document.getElementById("externalbtn").disabled =false;
} else if(args.item.text === "Delete"){
if(this.gridInstance.getSelectedRecords().length>0){
document.getElementById("externalbtn").disabled =true
}
}
}
|
[index.js]
beforeBatchSave(args){
document.getElementById("externalbtn").disabled =false; // trigger before save the changes
}
. . . .
render() {
return (<div className='control-pane'>
<button id="externalbtn" onClick={this.onClick.bind(this)}>External Button</button>
<div className='control-section'>
<GridComponent dataSource={this.data1} ref={grid => this.gridInstance = grid} enableHover={false} allowPaging={true} pageSettings={{ pageCount: 5 }} toolbar={this.toolbarOptions} editSettings={this.editSettings} beforeBatchSave={this.beforeBatchSave.bind(this)} toolbarClick={this.toolBarClick.bind(this)}>
. . . .
</div>
</div>);
|
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.