Loosing checkbox status after Form Post
Loosing checkbox status after Form Post
fventuri
Posts: 1Questions: 0Answers: 0
Hello everybody
I'm new to Datatables but I'm experiencing this problem: the user can select a team from a tables of teams, selecting one or more checkboxes. The table is paginated. When the choice is submitted (form and submit) only the teams checked in the current page are passed, instead of all the teams checked in the varous pages.
I also tried with the bSaveState set to true but only the navingation state is saved, not the checkbox one.
Can anyone tell me the righ thing to do?
this is the script:
[code]
jQuery(document).ready(function() {
/* Initialise the DataTable */
var oTable = jQuery('#clubsTable').dataTable( {
"bStateSave": false,
"iDisplayLength": 10,
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] },
{ "bSortable": false, "aTargets": [ 1 ] }
],
"aaSorting": [[ 5, "desc" ]],
"sDom": '<>rt<"bottom"lip><"clear">'
} );
jQuery("#nationFilter").each( function ( i ) {
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData( 3 ) );
jQuery('select', this).change( function () {
oTable.fnFilter( jQuery(this).val(), 3 );
} );
} );
} );
[/code]
I'm new to Datatables but I'm experiencing this problem: the user can select a team from a tables of teams, selecting one or more checkboxes. The table is paginated. When the choice is submitted (form and submit) only the teams checked in the current page are passed, instead of all the teams checked in the varous pages.
I also tried with the bSaveState set to true but only the navingation state is saved, not the checkbox one.
Can anyone tell me the righ thing to do?
this is the script:
[code]
jQuery(document).ready(function() {
/* Initialise the DataTable */
var oTable = jQuery('#clubsTable').dataTable( {
"bStateSave": false,
"iDisplayLength": 10,
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] },
{ "bSortable": false, "aTargets": [ 1 ] }
],
"aaSorting": [[ 5, "desc" ]],
"sDom": '<>rt<"bottom"lip><"clear">'
} );
jQuery("#nationFilter").each( function ( i ) {
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData( 3 ) );
jQuery('select', this).change( function () {
oTable.fnFilter( jQuery(this).val(), 3 );
} );
} );
} );
[/code]
This discussion has been closed.