Creating a sortable tree/grid in Javascript

14,462

Solution 1

This seems pretty nice: http://www.max-bazhenov.com/dev/ux.maximgb.treegrid/index.html

Uses ExtJS, which has some licensing limitations you have to consider.

Solution 2

I found all these components:

* seems not sortable

Personally I'm trying Treetable and, after some configurations (rummaging in the examples in the source of the documentation page...), I'm enjoying its simplicity and clarity.

Solution 3

After a long research for a treegrid, the best one that I came across is from jeasyui.com

http://www.jeasyui.com/demo/main/index.php?plugin=TreeGrid

enter image description here

Solution 4

The jstree plugin for jQuery tied with its plugin of jstree-grid can handle sorting (sorting is a plugin to the main jstree) that is quite flexible (and re-uses the jQuery UI theme you apply).

Is that the sort of grid you're looking for? You end up with a view very much like: jstree-grid-with-sort-themerolled

The sorting by column you'll have to manually add and then trigger a re-sort.

Share:
14,462
Kirschbaum
Author by

Kirschbaum

Analytics Lead Engineer at Gradle. Creator of stacktrace.js and other open-source software. Writes at eriwen.com and @eriwen.

Updated on June 15, 2022

Comments

  • Kirschbaum
    Kirschbaum almost 2 years

    I'd like to create a tree structure from JSON, but with multiple columns that can be sorted. I've seen lots of implementations of trees and grids but never one mixed.

    Does anyone know of a plugin or feature for any Javascript toolkit that can make this happen so I don't have to re-invent the wheel here?

  • Kirschbaum
    Kirschbaum over 15 years
    Exactly what I needed. In fact, we are already using Ext-JS. Thank you!!
  • eyelidlessness
    eyelidlessness over 15 years
    For the future, if you're looking for a widget and can describe it, it's probably already been done in ExtJS. ;)
  • bluish
    bluish over 13 years
    @Chau @Jason I think this is the new link: dev.sencha.com/playpen/ext-2.0/examples/grid/grid3.html
  • chrisTina
    chrisTina over 8 years
    Hi, can you please share some codes about the above example? Thanks
  • MarcGuay
    MarcGuay over 7 years
    This doesn't seem to have sorting capabiltiies