Hi Customer,
Thanks for your patience.
Based on your query, we have prepared a sample and
achieved your requirement using Change event of CheckBox component. On that
event, we can disabled the detailedTemplate property by adding (“e-disabled”)
className
to the classList.
Kindly refer the below code and sample for your
references.
|
[index.js]
onChange(args) {
if (!args.checked) {
this.gridInstance.detailTemplate = this.gridTemplate.bind(this);
this.gridInstance.refresh();
} else {
[].slice
.call(
this.gridInstance.element.querySelectorAll('.e-detailrowcollapse')
)
.forEach((item) => {
item.classList.add('e-disabled');
});
}
}
|
Sample link : https://stackblitz.com/edit/react-i1dw3m-yt5rer?file=index.html,index.js
Please get back to us, if you need any further
assistance.
Regards,
Vinitha Balasubramanian