when bStateSave is ture, the paging is invalid
when bStateSave is ture, the paging is invalid
deng.zz
Posts: 2Questions: 0Answers: 0
hello, when i use datatables, i set bStateSave with true.
but when page is refresh, the data is not correct. the Paging is invalid. (i use ajax data source)
finally, i found this "bug":
[code]
function _fnAjaxUpdate(oSettings) {
if (oSettings.bAjaxDataGet) {
... ...
aoData.push({ "name": "iDisplayStart", "value": oSettings._iDisplayStart });
... ...
[/code]
the vale of oSettings._iDisplayStart is 0 when the page refresh. i have change to this:
[code]
function _fnAjaxUpdate(oSettings) {
if (oSettings.bAjaxDataGet) {
... ...
aoData.push({ "name": "iDisplayStart", "value": (oSettings.iInitDisplayStart && oSettings.iInitDisplayStart >= 0 ? oSettings.iInitDisplayStart : oSettings._iDisplayStart) });
//aoData.push({ "name": "iDisplayStart", "value": oSettings._iDisplayStart });
... ...
[/code]
.
thank you.
but when page is refresh, the data is not correct. the Paging is invalid. (i use ajax data source)
finally, i found this "bug":
[code]
function _fnAjaxUpdate(oSettings) {
if (oSettings.bAjaxDataGet) {
... ...
aoData.push({ "name": "iDisplayStart", "value": oSettings._iDisplayStart });
... ...
[/code]
the vale of oSettings._iDisplayStart is 0 when the page refresh. i have change to this:
[code]
function _fnAjaxUpdate(oSettings) {
if (oSettings.bAjaxDataGet) {
... ...
aoData.push({ "name": "iDisplayStart", "value": (oSettings.iInitDisplayStart && oSettings.iInitDisplayStart >= 0 ? oSettings.iInitDisplayStart : oSettings._iDisplayStart) });
//aoData.push({ "name": "iDisplayStart", "value": oSettings._iDisplayStart });
... ...
[/code]
.
thank you.
This discussion has been closed.