Restore original data after $.fn.dataTable.ext.search.push
Restore original data after $.fn.dataTable.ext.search.push
alderhernandez
Posts: 33Questions: 11Answers: 1
how I can restore origianal information after $.fn.dataTable.ext.search.push
i am tryn this but doesn work, plis help me!!
i use a checkbox to filter values > 0 in one colum or not
if($("#test5").is(':checked')) {
$.fn.dataTable.ext.search.push(
function( settings, searchData, index, rowData, counter ) {
var min = 0.00;
var valor = parseFloat( searchData[6]); // using the data from the 6th column
if (( isNaN( min )) || ( valor != min))
{
return true;
}
return false;
}
);
}
else {
$.fn.dataTable.ext.search.push(
function( settings, searchData, index, rowData, counter ) {
var min = 0.00;
var valor = parseFloat( searchData[6]); // using the data from the 6th column
return true;
}
);
}
This discussion has been closed.
Replies
add $.fn.dataTable.ext.search.pop(); like this:
$.fn.dataTable.ext.search.push(
function( settings, searchData, index, rowData, counter ) {
var min = 0.00;
var valor = parseFloat( searchData[6]);
if (( isNaN( min )) || ( valor != min))
{
return true;
}
return false;
}
);
$.fn.dataTable.ext.search.pop();
This plug-in can be used to restore ordering to the order that the data was read in.
Allan