Subtable example?

Subtable example?

jnm99jnm99 Posts: 10Questions: 0Answers: 0
edited June 2010 in General
Can anyone provide a very simple example of nested table?
I am thinking of rows of the master table have associated a subtable and being toggled when clicked.
Do I add a for the associated subtable after each in the master table? DT seems to not show it then
It would be very nice if DT provided this as easily as jqgrid apparently does (in their advanced/subgrid demo) but some hints on how to best do it are very welcome as well.
Thank you for a very well documented and robust control - this is why I picked it over jqgrid after looking at both for a while without actually using them.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I haven't used it myself, but apparently treeTable can be made to work with DataTables: http://datatables.net/forums/comments.php?DiscussionID=2088 .

    Appending a single row to a parent in DataTables can be done using fnOpen and fnClose, and that can have any content you want - however this does not allow multi-levels of nesting. This is something which is planned for a future release.

    Regards,
    Allan
  • jnm99jnm99 Posts: 10Questions: 0Answers: 0
    thanks, it is indeed fnOpen/fnClose that I found after looking closer at existing examples, and it seems enough as I only need one level of nesting.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Excellent stuff - and thanks for the feedback :-)

    Regards,
    Allan
This discussion has been closed.