Displaying hierarchial data in dataTables

Displaying hierarchial data in dataTables

kshtjsnghlkshtjsnghl Posts: 8Questions: 0Answers: 0
edited August 2011 in General
I have a requirement of showing Hierarchial Data in a table like the following -
[code]
DUMMY_CORE AB
DUMMY_GR_RES
DUMMY_GR_RES_SIG
DUMMY_GR_COM
DUMMY_GR_COM_SIG
DUMMY_2ND
DUMMY_2ND_SIG
DUMMY_2ND_COM
DUMMY_2ND_COM_SIG
DUMMY_DOM_3DAY_RES
[/code]

(Every line is a 'row' in the table but one such group is a row from the data source)
I also need to fetch this data through ajax calls which I know I can do using dataTables.
But can I tweak it to handle this kind of hierarchial data.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited August 2011
    I've been doing some work on re-drawing data from datatables (rotating a table, or making a collection of image/links like google images). you could use this approach to load your nodes into something like jstree (http://www.jstree.com/). sorting by columns will probably be meaningless if you move to a tree, but the filtering and pagination controls might still be useful, I think. if not, then you might not want to use datatables.

    to intercept the table, I use fnDrawCallback, make the original table hidden, and redraw the data. see http://datatables.net/forums/discussion/5992/rotate-table#Item_10

    or see http://www.datatables.net/forums/discussion/5937/how-to-display-results-as-rows-instead-of-columns/p1
This discussion has been closed.