How to get data from two different columns and merge together with rows of each?
How to get data from two different columns and merge together with rows of each?

How do I get data from two different columns and merge them together but not by concatenating them. I was thinking that they would have rows of each. Can this be done with just a function in datatables?
This discussion has been closed.
Answers
If I understand correctly, you want to take one row, and create a second row from that. If so, the best place would be when the table has initialised, see
initComplete
, then scan all the rows withrows().every()
, and create the new rows withrow.add()
(orrows.add()
if you batch them up).Colin
This will then get the values of the two columns and put them in another column (combined values of the two columns) where each value will be in a single cell?
I think we're confusing ourselves here. Can you restate what you're after please, with examples, so it's clearer.
Colin