We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Checkbox on treeview

I have a treeView and I use the checkbox functionality. I have isChecked="IsChecked" in the treeView and the checkboxes show but I want them to be disabled, meaning you cannot check and uncheck them but still show based on the property. Can you, please tell me how to achieve that.
Thank you!

2 Replies

CI Christopher Issac Sunder K Syncfusion Team March 14, 2019 12:05 PM UTC

Hi Elena, 

Thank you for contacting Syncfusion support. 

You can disable the checkbox element alone instead of disabling the whole node. You need to include the class e-checkbox-disabled into the checkbox element using the drawNode event, 

function drawNode(args) { 
    let ele: HTMLElement = args.node.querySelector('.e-checkbox-wrapper'); 

Note: In the above sample, we have disabled all the checkboxes. If you want to disable a checkbox in a particular node, you can get the node id (args.node.id) from the drawNode event and set your condition to skip the other nodes. 

Please let us know if you need further assistance on this. 


EP Elena Popova March 19, 2019 10:12 AM UTC

Thank you for the support!
Best regards,

Live Chat Icon For mobile
Up arrow icon