The Wayback Machine - https://web.archive.org/web/20221231021831/https://github.com/royling/jquery.dataTables.TreeTable
Skip to content

royling/jquery.dataTables.TreeTable

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

jquery.dataTables.TreeTable

This is a plugin of jquery.dataTables to integrate jquery.treeTable v2.x. Not working with the latest jquery-treetable plugin

If you are still interested, I did create a live example here, hope this makes things clear.

To use this plugin, check out the first 2 points and make use of the APIs in point 3:

  • Add the feature char 'T' into "sDom" property in the initial settings of jquery.dataTables.
  • Specify initial settings for jquery.treeTable integrated, which is "oTreeTable" property in the initial settings of jquery.dataTables. For example:
    $('#example').dataTable({
        "sDom": "Ttfr",
        "oTreeTable": {
            "fnPreInit": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
            // This function will be registerd as "aoRowCallback" of jquery.dataTables,
            //  thus it has the same signature as "fnRowCallback".
            // Specify "id" & "class" attributes for each row (TR) required by jquery.treeTable:
            //   for parent rows, add class 'parent';
            //   for children rows, add a class with name of prefix - 'child-of-' and parent id
            },
            "showExpander": true,
            // The other settings to override the default options of jquery.treeTable, e.g. childPrefix, etc.
        },
        // The other settings of jquery.dataTables here...
    });
  • Few APIs (extending jquery.dataTables) are also added to handle treeTable specifically, those are:
    1. isTreeTable()
    2. fnReloadAjaxTreeTable(sNewSource, fnCallback, bStandingDraw)

About

Integrate jquery.treeTable into jquery.dataTables

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published