Double / Split Rows
Double / Split Rows
sanchotech
Posts: 2Questions: 0Answers: 0
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.
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.
This discussion has been closed.
Replies
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
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
https://docs.google.com/open?id=0BwMcXAaSbtZjTFRaMVFfdVJUT212bk9sVlJMWlZhZw
Sorry about that.
Best,
Bruno