Server side processing get next. reload data
Server side processing get next. reload data
Hi All,
I've run a few variations of things found around, but I'm not getting it!
Case: say, 10,000 records. I can pull the data using the following (code is just snippets - but it works)::
$(document).ready(function()
{
oTable = $('#sorting-advanced').dataTable( {
"bProcessing": true,
"bServerSide": true,
"iDisplayLength": 100,
"sPaginationType": "full_numbers",
"sAjaxSource": "data/getTable",
"fnServerData": function (sSource, aoData, fnCallback) {
alert("test");
aoData.push({ "name": "id", "value": 7 }); //not real data but I'll send some data if I need
$.getJSON(sSource, aoData, function (json) {
fnCallback(json);
});
},
"fnDrawCallback": function( oSettings )
{ ... set some bindings here }
});
and it gets me 100. All good. 100 is an arbitrary number in this example.
What I am having difficulty with is how to grab the next 100 records. I tried pipe-lining, that worked fine, but still the same issue: after pulling 5000 records with pipe-lining, how to go grab the next 5000; this is AFTER the user has gone through all the paging the pipe-line displays.
It doesn't matter if it's pipe-line or server side, I just can't seem to get it to ask for more, NEW, data, once we're at the last record or last page.
What am I missing?
I didn't add the controller or the view as, like I said, the code is working ... I just need to get it to reload the table with another set of data - same schema and all, just the next grouping which MUST be called. It's too large to pass it all!
Thanks!
BMXer
I've run a few variations of things found around, but I'm not getting it!
Case: say, 10,000 records. I can pull the data using the following (code is just snippets - but it works)::
$(document).ready(function()
{
oTable = $('#sorting-advanced').dataTable( {
"bProcessing": true,
"bServerSide": true,
"iDisplayLength": 100,
"sPaginationType": "full_numbers",
"sAjaxSource": "data/getTable",
"fnServerData": function (sSource, aoData, fnCallback) {
alert("test");
aoData.push({ "name": "id", "value": 7 }); //not real data but I'll send some data if I need
$.getJSON(sSource, aoData, function (json) {
fnCallback(json);
});
},
"fnDrawCallback": function( oSettings )
{ ... set some bindings here }
});
and it gets me 100. All good. 100 is an arbitrary number in this example.
What I am having difficulty with is how to grab the next 100 records. I tried pipe-lining, that worked fine, but still the same issue: after pulling 5000 records with pipe-lining, how to go grab the next 5000; this is AFTER the user has gone through all the paging the pipe-line displays.
It doesn't matter if it's pipe-line or server side, I just can't seem to get it to ask for more, NEW, data, once we're at the last record or last page.
What am I missing?
I didn't add the controller or the view as, like I said, the code is working ... I just need to get it to reload the table with another set of data - same schema and all, just the next grouping which MUST be called. It's too large to pass it all!
Thanks!
BMXer
This discussion has been closed.