Nikhil Das Nomula
Nikhil Das Nomula

Reputation: 1953

Fancy tree disable checkbox selection for nodes

Fancy tree

What we want is to disable the checkboxes based on custom classes that we add.

For e.g.:

renderNode: function(event, data) {

    if(!data.node.folder) {
        $(data.node.span).addClass("custom-class");
    }

    $(".custom-class").css({ // css to disable checkbox});

}

Upvotes: 2

Views: 4418

Answers (1)

mar10
mar10

Reputation: 14794

You cannot disable checkboxes using css only (just switch or dim the image). Rather use the api:

node.unselectable = true;
node.render();

Upvotes: 5

Related Questions