filtering oSettings is null error

filtering oSettings is null error

bingunginterbingunginter Posts: 3Questions: 0Answers: 0
edited September 2009 in General
help me
this is the code :

var oTable;
$(function() {
oTable = $('#ClassDataTable').dataTable({
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"aoColumns": [
{ "sType": "html" },
{ "sType": "html" },
{ "sType": "html" },
{ "sType": "html" }
]
});
oTable.fnFilter('val');
});

why is when it reach the fnFilter line, it throws an error oSettings is null

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Hi bingunginter,

    You have:
    "bFilter": false

    But then expect filtering to work:
    oTable.fnFilter('val');

    You've disabled filtering - so filtering isn't going to work :-). If you want to enable filtering, but not have DataTables insert the input element, use the sDom parameter: http://datatables.net/usage/options#sDom

    Allan
  • bingunginterbingunginter Posts: 3Questions: 0Answers: 0
    actually i have set the bfilter to true
    but it still giving me the oSettings is null error
  • bingunginterbingunginter Posts: 3Questions: 0Answers: 0
    ah never mind, I got it to work
    thanks
This discussion has been closed.