Hi Romulo,
Thanks for contacting Syncfusion support.
We have analyzed your query and we have achieved your requirement using beforeOpenColumnChooser event in Grid. In that, we can bind the click event for the checkbox inside the handler function of “beforeOpenColumnChooser” event of Grid. Please refer the code example below,
[html]
<ejs-grid [dataSource]='data' ... (beforeOpenColumnChooser)='checkboxclick($event)' [showColumnChooser]= 'true'>
...
</ejs-grid>
[ts]
public checkboxclick(args:any){
document.getElementsByClassName("e-ccdlg")[0].addEventListener("click", (args: any) => {
if(args.target.parentElement.classList.contains("e-checkbox-wrapper")) {
//This handler will be triggered each time a checkbox is clicked for column choosing.
console.log("checkbox clicked for choosing column");
}
})
}
We also would you like to know that when the “ok” button in the column chooser is clicked the “actionComplete” event will be triggered. In this event, you can get the columns you have currently checked/unchecked in the column chooser dialog. Please refer the code example below,
[html]
<ejs-grid [dataSource]='data' ... (actionComplete)='complete($event)' [showColumnChooser]= 'true'>
...
</ejs-grid>
[ts]
public complete(args:any){
if(args.requestType == "columnstate"){
console.log(args.columns);
}
}
Please get back to us if you need further assistance.
Regards,
Venkatesh Ayothiraman.