Is it possible to split one row into two?
Is it possible to split one row into two?
Current Output:
InvoiceNo Customer InvoiceDate ... Discount
76542145 Deloris C 2022-02-04 ... 22.34
Requested Output:
InvoiceNo Customer InvoiceDate ... Discount
76542145 Deloris C 2022-02-04
76542145 22.34
My client has a very particular request where they cannot extrapolate the data from a single line and it needs to be split into two rows. Is it possible to grab data from a previous row and add a new row with only the InvoiceNo & Discount? Note that the table is generated via Ajax. I tried messing around with row.add()
a bit, but cannot figure out how to get data from only the previous row while cycling through multiple rows.
A point in the right direction would be appreciated!
Answers
I would look at splitting the rows in the server script. If thats not possible then use
ajax.dataSrc
as a function to split the rows. See the last example in the docs.Kevin
Perhaps one other possibility for this specific case would be child rows. You can return a
tr
from the renderer which matches the host table's columns and have it inserted into the table. Not trivial perhaps, but it might be an option.Allan