jQuery plugin to show a tree structure in a table

Overview

jQuery treetable

CDNJS

jQuery treetable is a plugin for jQuery, the 'Write Less, Do More, JavaScript Library'. With this plugin you can display a tree in an HTML table, e.g. a directory structure or a nested list. Why not use a list, you say? Because lists are great for displaying a tree, and tables are not. Oh wait, but this plugin uses tables, doesn't it? Yes. Why do I use a table to display a list? Because I need multiple columns to display additional data besides the tree.

Download the latest release from the jQuery Plugin Registry or grab the source code from Github. Please report issues through Github issues. This plugin is released under both the MIT and the GPLv2 license by Ludo van den Boom.

Documentation

See index.html for technical documentation and examples. The most recent version of this document is also available online at http://ludo.cubicphuse.nl/jquery-treetable.

Examples

Comments
  • loadBranch doesn't do indents

    loadBranch doesn't do indents

    when you add rows to a node with loadbranch, the indents aren't done at it looks like the rows belong to the root node. you have to use 3.0.0 with the loadbranch function from 3.0.1

    i did this because in 3.0.1 the event onnodeexpand didn't work anymore.

    support 
    opened by pinkcow 13
  • Alignment next line in node

    Alignment next line in node

    Hello! I have a problem with alignment in the next line. Only the first line is well alignment. I wish it was like in the attached picture: treetable

    Does anyone have any idea? Thx

    support 
    opened by majos 12
  • JQuery TreeTable not working in IE (8, 9, 10, 11)

    JQuery TreeTable not working in IE (8, 9, 10, 11)

    Hello,

    I have installed jquery treetable plugin in to my project, It is working excellent in Chrome, Firefox, but when it comes to IE it is just displaying the data as normal rows rather than showing in Tree View. I have installed this Jquery file in my project which is using MVC C#. Do we have any fix for this? Please do help me.

    I also do some changes in jquery.treetable.js specified in #66, but it doesn't help. It is still showing like a normal table rather than a tree table. Any other suggestions?

    Thanks in advance.

    support 
    opened by gova515 11
  • I can't get the expand/collapse icons to show when adding node dynamically

    I can't get the expand/collapse icons to show when adding node dynamically

    Great widget! I'm trying to use this to implement something on a deadline, so hopefully you will be able to respond quickly.

    Here's what I'm trying to do:

    var foo = "asdf";
    var row = "6"; // assume I have a more elegant way of calculating the row number :-)
    var html_row = "<tr data-tt-id=\"" + row + "\"><td>" + foo+ "</td><td></td></tr>";
    var newRow = jQuery(html_row);
    // I don't know what this does, but I saw it in a sample somewhere and it looked important :-)
    var cquoi = jQuery(newRow[0]);
    // Add new root node
    jQuery('.myTableTree').treetable("loadBranch", null, cquoi);
    var newNode = jQuery('.presentationsTree').treetable("node", row);
    // Build HTML for child of new root
    var streamsHtml = "<tr data-tt-id=\"" + (row + 1) + "\" data-tt-parent-id=\"" + row + "\"><td>Streams</td><td></td></tr>";
    var streamsRow = jQuery(streamsHtml);
    cquoi = jQuery(streamsRow);
    // add new "Streams" node as child of "asdf" node
    jQuery('.myTableTree').treetable("loadBranch", newNode, cquoi);
    

    When I do this, the new table rows show up, but they have no tree table behavior. There isn't an expand/collapse icon, the rows are not selectable (I'm using the example from your site to show row selection), and clicking does not cause expanding or collapsing. See how there is no triangle icon next to "asdf".

    image

    What am I missing?

    support bug 
    opened by dlwhiteman 11
  • treetable 3.0.1 won't work using the java framework Wicket (in development mode)

    treetable 3.0.1 won't work using the java framework Wicket (in development mode)

    Hello, I'm using treetable 3.0.1 (and jquery 1.8.3) in combinaison with the java web application framework Wicket 1.5 This framework can be started in 2 modes : development and deployment mode. In development mode, the resulting html pages contains a lot of "wicket:" tags and tag attributes (that don't show up in deployment mode). Sadly, the treetable plugin doesn't work correctly using internet explorer 8 and Wicket in development mode.

    I've attached a zip file containing 2 web pages saved using internet explorer 8 (with anonymised data). The "deployment mode.htm" page will work correctly using internet explorer 8, but the "development mode.htm" won't work. No problem so far using Chrome and Firefox.

    Hope my english is not too bad :)

    Thierry.

    PS : Change the attached file extension from ".jpg" to ".zip"

    demo

    compatibility 
    opened by tbl0605 11
  • loadBranch : does not add expander to parent node

    loadBranch : does not add expander to parent node

    I'm currently using treetable to create folders and adding them to other folders.

    I use loadBranch function but it seems that it doest not refresh the view after adding rows.

    Plus, I would like to know if it would be possible to add a row on the root ? I didn't find a solution to do it.

    opened by lilithabaddon 10
  • ajax parent rows

    ajax parent rows

    It would be nice to have some of the children lazy loaded when the parent is expanded for the first time. I imagine having the expander image being changed for a loading image until the child elements are retrieved.

    At the moment I use a child row with the "loading" legend that when its visible triggers an ajax query and its replace by the content as soon as its retrieved.

    opened by Janther 9
  • Add support to sort by columns

    Add support to sort by columns

    Add support so rows could be sorted clicking on the columns, maybe with the help of a user-defined sorting function (in the same way the sort() function works) on each sort-capable column. This would require that internally the plugin generates a tree structure storing the hierarchy of the rows but also this tree structure would be used so rows could be added randomly so the requeriment of rows being inserted in order would be deprecated.

    opened by piranna 8
  • UI is not accessible to keyboard only users

    UI is not accessible to keyboard only users

    In my previous pull I forgot the css changed done by the drupal issue.

    Your issue : https://github.com/ludo/jquery-treetable/issues/27

    Drupal issue http://drupal.org/node/922022

    Drupal patch http://drupal.org/node/922022#comment-5252390

    opened by clemens-tolboom 8
  • Support for dynamic change of rows in the table.

    Support for dynamic change of rows in the table.

    Expander no longer uses margin-left (Resolved issue #2 and/or #9).
    Added treeTableRow method which allows initializing new rows added to the table. This change required Expander to only be added the first time.

    opened by whittet 8
  • Possibility to Sort the table by drag n drop (change order)

    Possibility to Sort the table by drag n drop (change order)

    Would it be possible to implement a feature where you can change the order of different rows?

    For example in http://ludo.cubicphuse.nl/jquery-treetable/ under "Complex Tree With Drag and Drop" I would like to be able to drag the "iPhone SDK License.rtf" and drop it right under "Acknowledgements.rtf".

    Just like how the "sortable" works in jQuery.

    Thanks a bunch in advance!

    enhancement 
    opened by karlingen 6
  • NPM version different than code on master and has a bug

    NPM version different than code on master and has a bug

    The version on NPM is 3.2.0-1 which has https://github.com/ludo/jquery-treetable/blob/3.2.0/jquery.treetable.js#L181 commented which is not the case in master.

    This commented is causing a bug which is resulting in the collapsed entries not getting expanded.

    @ludo Can you please remove that version or make a new version with the fix?

    opened by AmitPhulera 0
  • 404 errors on jQueryUI components

    404 errors on jQueryUI components

    As the titles saym I see 404 errors for all of the UI components on your examples page. As a result, drag-and-drop does not work. Looks good though. Thanks.

    opened by bseddon 0
  • Loadnode not loading child to its parent

    Loadnode not loading child to its parent

    Below is the code I have written for loading tree data settings.init(function (_data) { var data = _data; settings.data = data; for (var i = 0; i < _data.length; i++) { var row = { id: data[i].Id, level: data[i].Level, pid: data[i].PId, name: data[i].Name, taskType: data[i].TaskType, startDate: data[i].StartDate, endDate: data[i].EndDate }; var treenode = generateTreeNode(dom_table, row, row.level); treeData[row.id] = row; } });

    opened by RG2712 0
  • Remove sub-node check is not working on initializing first time tree

    Remove sub-node check is not working on initializing first time tree

    I have issue while initializing the tree data. On initializing, parent sub-nodes check is not working. parentDom.parent().find(".class-level").length always gives me length 0 even if it is a parent node

    this is the code I wrote on initialize: settings.onInitialized(function (_data) { settings.selectData = _data.TaskTypes; var data = _data.ProjectTasks; for (var i = 0; i < data.length; i++) { var row = { id: data[i].Id, level: data[i].Level, pid: data[i].PId, name: data[i].Name, taskType: data[i].TaskType, startDate: data[i].StartDate, endDate: data[i].EndDate }; var treenode=generateTreeNode(dom_table, row, row.level); treeData[row.id] = row; var expendIcon = dom_table.find("li.j-expend"); if (expendIcon.parent().attr("data-loaded")) { //toggleicon($(expendIcon)); //toggleExpendStatus(expendIcon, treenode); } } settings.bindDropDown(); });

    Please suggest

    opened by RG2712 1
A stupidly small and simple jQuery table sorter plugin

Stupid jQuery Table Sort This is a stupid jQuery table sorting plugin. Nothing fancy, nothing really impressive. Overall, stupidly simple. Requires jQ

Joseph McCullough 708 Dec 26, 2022
jQuery plugin to export a html table to JSON, XML, CSV, TSV, TXT, SQL, Word, Excel, PNG and PDF

tableExport.jquery.plugin Export HTML Table to CSV DOC JSON PDF PNG SQL TSV TXT XLS (Excel 2000 HTML format) XLSX (Excel 2007 Office Open XML format)

null 918 Dec 29, 2022
A JQuery plugin to create AJAX based CRUD tables.

What is jTable http://www.jtable.org jTable is a jQuery plugin used to create AJAX based CRUD tables without coding HTML or Javascript. It has several

Volosoft 1.1k Dec 21, 2022
Live searching/filtering for HTML tables in a jQuery plugin

jQuery Filter Table Plugin This plugin will add a search filter to tables. When typing in the filter, any rows that do not contain the filter will be

Sunny Walker 175 Oct 29, 2022
jQuery plugin to make HTML tables responsive

FooTable V3 This is a complete re-write of the plugin. There is no upgrade path from V2 to V3 at present as the options and the way the code is writte

FooPlugins 2.1k Dec 19, 2022
jQuery grid plugin

jqGrid jQuery grid plugin jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the w

Tony Tomov 2.8k Jan 7, 2023
Lightweight Grid jQuery Plugin

jsGrid Lightweight Grid jQuery Plugin Project site js-grid.com jsGrid is a lightweight client-side data grid control based on jQuery. It supports basi

Artem Tabalin 1.5k Dec 31, 2022
jQuery plugin for stacking tables on small screens

stacktable.js The Responsive Tables jQuery plugin for stacking tables on small screens. The purpose of stacktable.js is to give you an easy way of con

John Polacek 1k Nov 30, 2022
An Obsidian plugin to provide an editor for Markdown tables

An Obsidian plugin to provide an editor for Markdown tables. It can open CSV data and data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables from Obsidian Markdown editor.

Ganessh Kumar 112 Dec 31, 2022
This is a jquery ui sortable helper plugin for handy tree type structure sotable.

Tree Sortable A drag and drop list item sorting and level changing library. Motivation The jQuery-ui's sortable plugin allows us to sort items vertica

Sajeeb Ahamed 10 Dec 23, 2022
TV Show App is an application that allows to searh tv shows based on user input. Each tv show is displayed in a Bulma Card component and when clicked, heads you to the official tv show site

TV SHOW APP TV Show App is an application that allows to search tv shows based on user input. Each tv show is displayed in a Bulma* Card component and

HENDEL SAMY 1 Dec 19, 2021
Fancytree - JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading

Fancytree Fancytree (sequel of DynaTree 1.x) is a JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkb

Martin Wendt 2.6k Jan 9, 2023
Chart.js scale for hierarchical tree-like data structure

Chart.js Hierarchical Scale Plugin Chart.js module for adding a new categorical scale which mimics a hierarchical tree. Related Plugins Check out also

Samuel Gratzl 40 Dec 17, 2022
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
Pickle tree - Javascript tree component made with pure javascript

Pickle Tree Pickle tree is a tree component written as completely pure javascript. Just send json file to object and have fun :-D Pickle tree does't n

Kadir Barış Bozat 17 Nov 13, 2022
Another table select prompt plugin of inquirer.js, with powerful table render and filters.

inquirer-table-select-prompt Table row selection prompt for Inquirer.js 动机 现有的 inquirer.js 没有支持表格行选中的命令行交互的插件. 社区内能查找到的,只有一个二维数组的 checkbox,eduardobouc

锂电 3 Jan 7, 2023
🔎 (Draft!) VSCode extension to show the search results in a tree view

vscode-search-tree ?? (Draft!) VSCode extension to show the search results in a tree view The work on this extension is on-pause for now since VSCode

Oleksii Trekhleb 16 Sep 7, 2022
JQuery-TableToExcel - Light weight jQuery plugin for export HTML table to excel file

tableToExcel Light weight jQuery plugin for export table to excel file Demos Website and demo here: http://tanvirpro.com/all_project/jQueryTableToExce

Tanvir Sarker 4 May 8, 2022
Source code for my tutorial on how to build customizable table component with React Table and Tailwind CSS.

React Table + Tailwind CSS = ❤️ Source code for my tutorial on how to build customizable table component with React Table and Tailwind CSS. Both parts

Samuel Liedtke 147 Jan 7, 2023