Editor serverside load all the records instead just the ones needed
Editor serverside load all the records instead just the ones needed
Hi everybody,
I bought recently the editor, and I'm not able anymore to interact correctly with mysql dB.
At the init it download all the records, instead of just the 25 i asked for the pagination.
With iDisplayLength I'm able to visualize just them, solving the problem of paginating, but still after It downloaded all the records (10.000). Also I have to use bserverside: true (?) insted o serverside:true, or It doesn't work at all.
I was able to do the same process without editing in Datatables, and it work. I see that the php library is different, I'll try with the total record and filtered record, but nothing.
I used the configurator to create the dummy structure and I work on it.
this is my code:
var table = $('#MyTable').DataTable( {
ajax: 'php/table.MyTable.php',
bProcessing: true,
bserverSide: true,
biDisplayLength : 10,
columns: [
{
"data": "campo1"
},
{
"data": "campo2"
},
{
"data": "campo3"
},
{
"data": "campo4", render: $.fn.dataTable.render.number( '.', ',', 2, '€ ' )
}
],
select: true
} );
Here a working example:
http://www.geodipe.it/dataLab/wp-content/plugins/DataTablesEditor2/OPERE_OUT.html
any suggestion?
This question has an accepted answers - jump to answer
Answers
...
Try using:
See also this example.
Allan
Thanx Allan,
that solved the problem.
Just to understand it's a matter of asynchronous call?
It is an async call, yes, but the issue with the initial code was:
bServerSide
(serverSide
is the "modern" option to use anyway)Allan