Pagination control duplicating after putting back in to DOM

Pagination control duplicating after putting back in to DOM

bruceiowbruceiow Posts: 4Questions: 1Answers: 0

Hi guys,

Got some odd behaviour on DT. I have a lovely table with datatables enabled, each row on the table has a view link. When the user clicks the link I copy the entire table and its containing divs into jquery session and route off to a brand new view. When the user returns back to the original page if there is a value in the session I put all of the html I copied earlier back in to the original div that it came from by doing this:

$('#myContainterDiv').html( sessionStorage.getItem("myReport"));

This brings back the display fine, but the pagination is then duplicated at the bottom of the table (albeit a pagination with only one page regardless of how many pages the original had). The ID of the pagination is duplicated on the page which isn't good!!

I have tried obvious things like destroying the DT control using destory:true but it didn't work.

Can anyone offer me any advice here?

Answers

This discussion has been closed.