drawCallback drawing on top of existing rows
drawCallback drawing on top of existing rows
mcsmithe
Posts: 4Questions: 2Answers: 1
Hi everyone,
I am encountering a bug for drawcallback
. It draws a sum row as expected on most of the entries, however, sometimes it seems to draw over the regular rows. My data is consistent all around and most entries look great, it's only some entries liek this that seem to look strange.
My function is as follows:
if (last !== affId_offId) {
$(rows).eq(i).before(
'<tr class="group" style="border: 1px solid #777"><td colspan="1" style="background-color:#BEBEBE"><button class="showDetails" id="button-' + affId_offId + '">►</button></td><td colspan="1" style="background-color:#BEBEBE">' + startDateSelect.slice(5) + ' to ' + endDateSelect.slice(5) + '</td><td colspan="1" style="background-color:#BEBEBE">' + affId_offId + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].cost + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].revenue + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].profit + '</td><td colspan="1" style="background-color:#BEBEBE" class="profitMarginSummary">' + summary[affId_offId].profitMargin + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].cpc + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].rpc + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].rpa + '<td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].name + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].offer + '</td><td colspan="1" style="background-color:#BEBEBE">' + summary[affId_offId].affiliate + '</td></tr>'
);
last = affId_offId; // other processes like the summing itself follow later
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Its hard to see what is going on with the snippet of code provided. Can you post a link to your page or a test case showing the issue?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I can't share the page since it has confidential information unless I share that privately. I will try for a test case though my code is pretty extensive (over 200 lines) since I have accumulators and everything in there, so honestly I don't think I can produce a test case here either. Here's a little more other than some styling I had in there
I don't immediately see anything wrong there, so I'm afraid we would need a test case as Kevin mentioned. We don't need your actual page, so there is no need for us to see the confidential information, we just need a minimal, complete and verifiable example. http://live.datatables.net , JSfiddle, CodePen or others can be used to create a test case if you can't host it yourself.
Allan
Hey all, it was actually having to use a fixed ordering rather than the regular one. Thanks for the help though.