Cannot extract column data when using server side processing
Cannot extract column data when using server side processing
ierpe
Posts: 6Questions: 1Answers: 0
Hi,
I'm trying to achieve select filtering while using server side processing, but it's not working and I do not have any error message.
If someone could help me figuring out what's wrong...
I'm following this documentation page : https://next.datatables.net/examples/api/multi_filter_select.html
Basically the select is added but not filled with any data.
The :
[code]
table.column(i).data().unique().sort().each(function(d, j) {
console.log(d);
});
[/code]
is not printing anything.
Any idea what's wrong? Is this working for you guys?
My datatable init looks like this :
[code]
var table = $('table#test').DataTable({
"processing": true,
"serverSide": true,
"ajax": "<?php echo $my_ajax_url?>",
"stateSave": true,
});
[/code]
I'm trying to achieve select filtering while using server side processing, but it's not working and I do not have any error message.
If someone could help me figuring out what's wrong...
I'm following this documentation page : https://next.datatables.net/examples/api/multi_filter_select.html
Basically the select is added but not filled with any data.
The :
[code]
table.column(i).data().unique().sort().each(function(d, j) {
console.log(d);
});
[/code]
is not printing anything.
Any idea what's wrong? Is this working for you guys?
My datatable init looks like this :
[code]
var table = $('table#test').DataTable({
"processing": true,
"serverSide": true,
"ajax": "<?php echo $my_ajax_url?>",
"stateSave": true,
});
[/code]
This discussion has been closed.
Replies
Also be aware that the filter will only show the data for the current page if you do it that way with server-side processing enabled, since the whole point of server-side processing is to only show the data needed for the current page.
Allan
Yes that was the problem.
I guessed the problem was linked with the data being loaded in Ajax, but I am new to Datatables, using the 1.10 and the documentation is lacking many details in my opinion.
In this case, it would have been useful for me if this was mentioned in the doc...
Anyway thanks for the quick answer and for the great plugin! :)