Hi Semenii,
Greetings from Syncfusion support.
We're glad to inform you that we've found a solution to your
query using the columnMenuModule. Here is the code snippet that can help
you achieve your requirement:
[index.js]
let grid;
function created() {
grid.columnChooserModule.dlgDiv.addEventListener("click", (args)
=> {
if
(grid.columnChooserModule.mainDiv.getElementsByClassName("e-chk-hidden")[0].getAttribute('aria-checked')
=== "false") {
grid.columnChooserModule.dlgObj.btnObj[0].disabled = true;
} else {
grid.columnChooserModule.dlgObj.btnObj[0].disabled = false;
}
});
}
<GridComponent ref={ g => grid = g } id="grid"
dataSource={data} allowPaging={true} showColumnChooser={true}
toolbar={toolbarOptions} pageSettings={{ pageCount: 5, pageSize: 5 }} created={created}>
|
Additionally, we've prepared a sample using the above code
snippet that you can refer to:
Sample: https://stackblitz.com/edit/react-zoxf6p?file=index.js
Please let us know if you have any further queries.
Regards,
Santhosh
I