Trying Server side processing Individual column filtering
Trying Server side processing Individual column filtering
janke
Posts: 19Questions: 0Answers: 0
I try to apply default search on column 5 but the parameter
columns[5][search][value]
is empty could you help me Thanks
My code :
var oTable = $('#example').DataTable( {
"responsive": true,
"processing": true,
"serverSide": true,
"ajax": "scripts/server_processing.php",
"oLanguage": {
"sUrl": "media/FR.txt"
},
"pagingType": "full_numbers",
"pageLength": 20
,"lengthMenu": [[10, 20, 40,60], [10, 20, 40,60]]
,"columnDefs": [
{"searchable": true,"width": "10%", "targets": [ 0 ] },
{"searchable": true, "width": "50%", "targets": [ 1 ],
"render": function (data, type, full) {
var cle_mega = full[4]; //row id in the first column
return "<a href='/gds/composants/contexte_maj.php?application_cle_mega="+cle_mega+"&acte=imprim' target='_blank'>"+full[1]+"</a>";
}},
{ "searchable": true,"width": "10%", "targets": [ 2 ] },
{ "searchable": true,"width": "30%", "targets": [ 3 ] },
{ "searchable": false,"visible": false, "targets": [ 4 ] },
{ "searchable": true,"visible": false, "targets": [ 5 ],"search":["value"][3]}//here try to init search value
]
,"order": [ [0,'asc'], [1,'asc'] , [2,'asc'] ]
});
This discussion has been closed.
Replies
I found
I try with new API
"searchCols" is correct for 1.10 +.
http://datatables.net/reference/option/searchCols