fnMultiFilter and Pagination
fnMultiFilter and Pagination
leonardolima
Posts: 5Questions: 0Answers: 0
I'm trying to make work the fnMultiFilter together with the Pagination, but I'm getting a pagination error.
For example, if I use the pagination before filter and later use the filter to retrive a specific result, the filter works well but the pagination don't return to the first page.
The pagination number stills like inactive, just after I click on the number, the pagination return to the first page and my register is there.
Is possible to make the pagination be reseted to the first page after apply the filter?
[code]
$.fn.dataTableExt.oApi.fnMultiFilter = function (oSettings, oData) {
for (var key in oData) {
if (oData.hasOwnProperty(key)) {
for (var i = 0, iLen = oSettings.aoColumns.length; i < iLen; i++) {
if (oSettings.aoColumns[i].sName == key) {
/* Add single column filter */
oSettings.aoPreSearchCols[i].sSearch = oData[key];
break;
}
}
}
}
this.oApi._fnDraw(oSettings);
};
[/code]
Thanks,
Best Regards,
Leonardo Lima
For example, if I use the pagination before filter and later use the filter to retrive a specific result, the filter works well but the pagination don't return to the first page.
The pagination number stills like inactive, just after I click on the number, the pagination return to the first page and my register is there.
Is possible to make the pagination be reseted to the first page after apply the filter?
[code]
$.fn.dataTableExt.oApi.fnMultiFilter = function (oSettings, oData) {
for (var key in oData) {
if (oData.hasOwnProperty(key)) {
for (var i = 0, iLen = oSettings.aoColumns.length; i < iLen; i++) {
if (oSettings.aoColumns[i].sName == key) {
/* Add single column filter */
oSettings.aoPreSearchCols[i].sSearch = oData[key];
break;
}
}
}
}
this.oApi._fnDraw(oSettings);
};
[/code]
Thanks,
Best Regards,
Leonardo Lima
This discussion has been closed.