Intru
Intru

Reputation: 650

Sorting the nodes of a jQuery TreeTable

I am using the jQuery TreeTable plugin to display a tree of tabular data, which works really nice. Using jQuery UI's draggable & droppable allows to drop nodes onto parent nodes, just as in the example of TreeTable. This uses TreeTable's appendBranchTo method.

This all works really nice, except that it doesn't allow sorting of the items. Sorting individual items should (I hope) be relatively easy, since this just means reordering some tr elements. However, I do not know how to do this for items/folders that contain other items: all the children would need to be moved too.

What would be the best way to achieve this behavior, or has anyone else done this before? Using a different plugin (that also allows reordering) for the treeview is fine too.

Upvotes: 1

Views: 2238

Answers (1)

Intru
Intru

Reputation: 650

To answer my own question: I was not able to get this working with TreeTable. I ended up using nestedSortable, and used some CSS to fake a table layout inside the <li> elements

Upvotes: 1

Related Questions