Question

I have tree created with Dynatree, with checkboxes in it.

Can you help me how can I get a list (or array) of checked checkboxes in it, so I can manipulate with them (move them into another tree)?

Tnx in adv!

Était-ce utile?

La solution

Ok, here it is:

        var selNodes = node1.tree.getSelectedNodes();
        // convert to title/key array
        var selKeys = $.map(selNodes, function(node1){
            alert("[" + node1.data.key + "]: '" + node1.data.title + "'");
        });
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top