fnFilter issue. Need help ASAP.

fnFilter issue. Need help ASAP.

janrusselcalachanjanrusselcalachan Posts: 10Questions: 0Answers: 0
edited April 2012 in General
Good day Allan,

I initialized my datatable like this
[code]

var janTable = $("#contentTable1").dataTable({
"bLengthChange": false,
"bAutoWidth": false,
"bJQueryUI": true,
"bFilter": false,
"aoColumns": [{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bVisible": false },
{ "bVisible": false}] });

[/code]

What am i trying to do is that, whenever a person selects from a dropdownlist, the datatable "janTable", which is a list of schedule for the month of january, will be filtered based on the "Level Applying For"

The "Level Applying for" dropdownlist has 3 values, 1 for preschool, 2 for gradeschool and 3 for highschool

So I tried filtering the datatable by doing it like this:

[code]
$("#cboxLevelApp").change(function () {
var LevelID;
LevelID = $('#cboxLevelApp').val(); //This is working perfectly and when I alert the value of LevelID, it gets the correct value
janTable.fnFilter("^" + LevelID.toString() + "$", 5, true); //This is the part where I am having a problem.
[/code]

I tried to look at the error on the Firebug Developer Console and the problem says:

[quote]
e is null
line of error: jquery.dataTables.min.js
[/quote]


Thank you in advance. More power to you! DataTables rocks!

Replies

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    You've disabled filtering with "bFilter": false, but expect filtering to still work? :-). I presume you just want the filtering input box removed? In which case remove the 'f' option from sDom .

    Allan
This discussion has been closed.