fnStandingRedraw shows no records in datatable plugin

fnStandingRedraw shows no records in datatable plugin

MuddassirMuddassir Posts: 1Questions: 0Answers: 0
edited March 2014 in DataTables 1.9
Here is the link of the sample datatable with pagination http://live.datatables.net/dufuyab/1/


I am using jQuery datatable plugin to display a list of records on my page. I am getting all my data from the server side and handling paganation from the server side as well. I wanted that whenever I referesh the table the page state should be maintained. I use the following plugin to achieve this

oTable.fnStandingRedraw();
This works fine except if i am on the final page of the table and i delete all records from that page and call the fnStandingRedraw() function it shows that the table is empty and when clicking on the previous page it shows all records again.

here is the code for the fnStandingRedraw plugin that i am using

$.fn.dataTableExt.oApi.fnStandingRedraw = function (oSettings) {
if (oSettings.oFeatures.bServerSide === false) {
var before = oSettings._iDisplayStart;

oSettings.oApi._fnReDraw(oSettings);

// iDisplayStart has been reset to zero - so lets change it back
oSettings._iDisplayStart = before;
oSettings.oApi._fnCalculateEnd(oSettings);
}

// draw the 'current' page
oSettings.oApi._fnDraw(oSettings);
};
This discussion has been closed.