BUG with version 1.7.3 - checked checkboxes are unchecked when paginate
BUG with version 1.7.3 - checked checkboxes are unchecked when paginate
diondu
Posts: 24Questions: 0Answers: 0
I'm using version 1.7.3 and have a table (not in ajax) with checkboxes inside columns.
I check a checkbox, then paginate the table and return to the previous page the checkbox apear unchecked.
The table doesn't remember that the checkbox was checked.
Fernando
I check a checkbox, then paginate the table and return to the previous page the checkbox apear unchecked.
The table doesn't remember that the checkbox was checked.
Fernando
This discussion has been closed.
Replies
For all the other browsers I've tried this in, I've not seen this issue.
Allan
I have a column with checkbox, i checked a few rows, paginate, submit the form, but no checked values was received on the backend. It seems that as the page paginate, the rows on the first page is removed from the DOM, thus the backend doesnt see it.
But if i select 100 entries to show, I am able to check these and send to backend. The problem only occurs with pagination.
Any options to disable removal from DOM but using something like show/hide?
Looking for suggestions as well...
An alternative is to use the fnGetHiddenNodes ( http://datatables.net/plug-ins/api#fnGetHiddenNodes ) to get the hidden nodes and manipulate them as needed. There are a number of threads on this subject such as:
http://datatables.net/forums/comments.php?DiscussionID=185
http://datatables.net/forums/comments.php?DiscussionID=2470
Allan
Should I be creating a hidden form element that will store the checkbox values? Looking for the easiest way to achieve this. Help is appreciated.
Thanks,
Rhon
Thanks for the pointing out the direction... I managed to get it to work with this code:
[code]
var table = $('table.dataTable').dataTable();
$('.submitDataTable').click(function() {
var hiddenRows = table.fnGetHiddenTrNodes();
$('table.dataTable tbody').append(hiddenRows);
});
[/code]
But be advised that this won't work on IE6 as pointed out in http://datatables.net/forums/comments.php?DiscussionID=185
Cheers,
11th
Craig