Hello,
I am confused with about the Datatable and pagination with append data.
On initialise the datatable I use:
$$(“historylisting”).loadNext(5, 0, null, “connectajax.php?junction=getRunHistory&data1=0”);
This will call on database
Select * FROM run_protocol ORDER BY id DESC LIMIT 0,5
will return right dataset. Shown in datatable the right way.
Now with next button I use
var countItems = Object.keys($$(“historylisting”).data.pull).length;
$$(“historylisting”).loadNext(5, countItems, null, “connectajax.php?junction=getRunHistory&data1=”+countItems);
This will call on database
Select * FROM run_protocol ORDER BY id DESC LIMIT countItems,5
will return right dataset, start fron 5, next .
BUT NOW: Every time the first dataset is shown again and again in the datatable. I expect the LoadNext will append the new data to the datatable and not clone the first one all the time.
Very confusing. Please help.