Custom Filter not working

Custom Filter not working

RSHRSH Posts: 1Questions: 1Answers: 0

Hi,

Im having a problems filter rows based on a condition.

These are my two rows of interest:
<td class="seven-day-filter">@_event.SevenDayFilter</td>
<td class="thirty-day-filter">@_event.ThirtyDayFilter</td>

They are in a paged DataTable.

Here is my Javascript for the Seven Day Filter:

$("#show-seven-day-rows").click(function () {
$.fn.dataTable.ext.search.push(
function (settings, data, dataIndex) {
return $(oTable.row(dataIndex).cell('.seven-day-filter').data()==7);
}
);
oTable.draw();
});

No errors in the console...it just plain doesn't do anything.

What am I doing wrong?

Thanks,
Ron

This discussion has been closed.