Problem on the function 'fnPageChange ()'.
Problem on the function 'fnPageChange ()'.
lesmyrmidons
Posts: 2Questions: 0Answers: 0
Hello,
Let me explain what I do:
I have a table with more page with checkbox for all lines. I have a button to 'check all' and I have to check every line of every page.
For that, I did this:
[code]var oSettings = oTable.fnSettings ();
oTable.fnPageChange ( 'first'); // first page
var iRowEnd = oSettings.fnRecordsDisplay ();
var iPagingEnd = oSettings._iDisplayStart;
while (iPagingEnd
Let me explain what I do:
I have a table with more page with checkbox for all lines. I have a button to 'check all' and I have to check every line of every page.
For that, I did this:
[code]var oSettings = oTable.fnSettings ();
oTable.fnPageChange ( 'first'); // first page
var iRowEnd = oSettings.fnRecordsDisplay ();
var iPagingEnd = oSettings._iDisplayStart;
while (iPagingEnd
This discussion has been closed.
Replies
There is an easier way. Something like:
[code]
$('.OrderID', oTable.fnGetNodes() ).attr('checked', true);
[/code]
would do it - rather than needing to page through each display page. Having said that, there shouldn't ne anything wrong with fnPageChange, particularly since DataTables uses it internally for pagination! I wonder if it's something to do with the loop - only a trace would say though. I'll see if I can test fnPageChange before the next release - but I'd suggest something like the above one liner :-)
Regards,
Allan
Thank you for your reply.
It runs on almost all browsers except IE6 (it does not re-check the checkbox at the re-display the first page)
Again thank you and congratulations for this plugin.