Column Filter Server Side Multiple Tables
Column Filter Server Side Multiple Tables
Hi all,
I have do like in this example : http://jquery-datatables-column-filter.googlecode.com/svn/trunk/issue30.html
But I don't know why, filter work just on my last table.
Code JS:
[code]
$('#tabDetail').dataTable({
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [{
"sExtends": "download",
"sButtonText": "EXCEL",
"sUrl": "generer_csv.php"
},{
"sExtends": "download",
"sButtonText": "PDF",
"sUrl": "generer_pdf.php"
}, "print"]
},
"sAjaxSource": "serverSideDetail.php",
"fnServerData": function( sUrl, aoData, fnCallback ) {
$.ajax( {
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "json",
"cache": false
} );
}
}).columnFilter({
aoColumns: [{ type: "input" },
{ type: "date-range" },
{ type: "time-range" , values: ["07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]},
{ type: "select", values: ['muret', 'labarthe']}]
});
$('#tabEntrees').dataTable({
"aaSorting": [[ 4, 'desc' ]],
"aoColumnDefs": [{ "bSortable": false, "aTargets": [ 0, 1, 2, 3, 4 ]}],
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [{
"sExtends": "download",
"sButtonText": "EXCEL",
"sUrl": "generer_csv.php"
},{
"sExtends": "download",
"sButtonText": "PDF",
"sUrl": "generer_pdf.php"
}, "print"]
},
"sAjaxSource": "serverSideRecurrenceEntrees.php",
"fnServerData": function( sUrl, aoData, fnCallback ) {
$.ajax( {
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "json",
"cache": false
} );
}
}).columnFilter({
aoColumns: [{ type: "input" },
{ type: "date-range" },
{ type: "select", values: ['muret', 'labarthe']}]
});
[/code]
Code HTML :
[code]
Détail des entrées
Usager
Date d'entrée
Heure d'entrée
Déchèterie
Commune
Statut
Récurrence des entrées
Usager
Dernière date d'entrée
Déchèterie
Commune
Total
[/code]
Help please, I really don't know where the problem.
Thank
Magali
I have do like in this example : http://jquery-datatables-column-filter.googlecode.com/svn/trunk/issue30.html
But I don't know why, filter work just on my last table.
Code JS:
[code]
$('#tabDetail').dataTable({
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [{
"sExtends": "download",
"sButtonText": "EXCEL",
"sUrl": "generer_csv.php"
},{
"sExtends": "download",
"sButtonText": "PDF",
"sUrl": "generer_pdf.php"
}, "print"]
},
"sAjaxSource": "serverSideDetail.php",
"fnServerData": function( sUrl, aoData, fnCallback ) {
$.ajax( {
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "json",
"cache": false
} );
}
}).columnFilter({
aoColumns: [{ type: "input" },
{ type: "date-range" },
{ type: "time-range" , values: ["07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]},
{ type: "select", values: ['muret', 'labarthe']}]
});
$('#tabEntrees').dataTable({
"aaSorting": [[ 4, 'desc' ]],
"aoColumnDefs": [{ "bSortable": false, "aTargets": [ 0, 1, 2, 3, 4 ]}],
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [{
"sExtends": "download",
"sButtonText": "EXCEL",
"sUrl": "generer_csv.php"
},{
"sExtends": "download",
"sButtonText": "PDF",
"sUrl": "generer_pdf.php"
}, "print"]
},
"sAjaxSource": "serverSideRecurrenceEntrees.php",
"fnServerData": function( sUrl, aoData, fnCallback ) {
$.ajax( {
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "json",
"cache": false
} );
}
}).columnFilter({
aoColumns: [{ type: "input" },
{ type: "date-range" },
{ type: "select", values: ['muret', 'labarthe']}]
});
[/code]
Code HTML :
[code]
Détail des entrées
Usager
Date d'entrée
Heure d'entrée
Déchèterie
Commune
Statut
Récurrence des entrées
Usager
Dernière date d'entrée
Déchèterie
Commune
Total
[/code]
Help please, I really don't know where the problem.
Thank
Magali
This discussion has been closed.
Replies
In Firebug, on the first table, parameters are void, but in the second table, there are right.
Why parameters are send just one time ?
Magali
How can I change it ? Filter applied on the table where is it !
Magali
http://jquery-datatables-column-filter.googlecode.com/svn/trunk/multipleTables.html
Magali
I don't find the solution anywhere.
Allan, have you an idea ? Somebody ?
I have post my problem on code project, but I don't have comment yet.
Help me please, I have to present the project on February 5th and I don't know what can I do !!
Magali