Datatables combined with 3rd party pagination?

Datatables combined with 3rd party pagination?

burntsausageburntsausage Posts: 9Questions: 0Answers: 0
edited October 2011 in General
I love Datatables but in my ADF java application, the array based pagination Datatables uses doesn't work when I need to save what's been changed in the table when there is more than one page.

So I believe I need a paginator that only hides rows but keeps everything in the dom.

Has anyone tried combining datatables with a 3rd party paginator with success?

It's a long shot but worth asking... :)

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    The behaviour of removing rows from the DOM when they aren't needed is deeply rooted in DataTables and can't be overcome by a 3rd party plug-in (as this is built right into the draw function). It would probably be possible to modify the draw function so the rows you want are display: none rather than removed, but I would imagine that there will be a performance hit to that.

    Allan
  • burntsausageburntsausage Posts: 9Questions: 0Answers: 0
    I'd take the perfomance hit, nothing could be as painful as waiting for ADF to do it's thing!

    If you could point me to the area of code to change that would be awesome.

    Is it actually the fnDraw() function I should be looking at?

    Thanks
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Its the internal draw function (_fnDraw) that you want to have a look at: https://github.com/DataTables/DataTables/blob/master/media/js/jquery.dataTables.js#L3167 . Have a look at the section of that function which does the removeChild() call on the table.

    Allan
This discussion has been closed.