Double / Split Rows

Double / Split Rows

sanchotechsanchotech Posts: 2Questions: 0Answers: 0
edited February 2012 in Feature requests
I need to display each record in two rows, as in this table:

https://docs.google.com/open?id=0BwMcXAaSbtZjTFRaMVFfdVJUT212bk9sVlJMWlZhZw

Notice the second row spans through all the columns.
There's a couple of discussions with similar subjects, but they seem to be outdated (2009 or so) and the presented solutions look quite complex (at least to me :-) ). They don't provide the solution by itself, but they are rather a variation on the row drill-down feature.
Is there a more direct solution to my needs?

Any help on how to achieve this effect would be greatly appreciated.

Best,
Bruno

PS: sorry, I posted this discussion twice since the first one went to the wrong category - please, moderator, remove the first one in "general" category. Thanks.

Replies

  • allanallan Posts: 60,961Questions: 1Answers: 9,939 Site admin
    Hi Bruno,

    Thanks for noting the double post :-)

    Currently, DataTables does not, itself, have built-in support for double row information. However, it is relatively easy to do using fnDrawCallback. Basically what you would do, on each draw, is to loop over the rows in the table and for each one add the required second row (you can use the fnGetData or _ API methods to get the data for each row).

    Not trivial I admit, but very flexible!

    Allan
  • sanchotechsanchotech Posts: 2Questions: 0Answers: 0
    Hi Allan,

    Thanks for the prompt reply. I'm a kind of a beginner in programming and I can make my way through if I have some clues. Would it be too much to ask you for a code snippet? So, I can adapt it to my table.

    Thank you so much.

    Best,

    Bruno
  • sanchotechsanchotech Posts: 2Questions: 0Answers: 0
    The correct link for the above post is:

    https://docs.google.com/open?id=0BwMcXAaSbtZjTFRaMVFfdVJUT212bk9sVlJMWlZhZw

    Sorry about that.

    Best,

    Bruno
This discussion has been closed.