Issue with re-initializing dataTable having columnFilter with type checkbox.
Issue with re-initializing dataTable having columnFilter with type checkbox.

Ref:
jquery.dataTables.js 1.9.4
jquery.dataTables.columnFilter.js 1.5.1.
I'm having issue with reinitializing jquery datatable when any search criteria changes with the click of show result button.
It works fine with first load & doing sorting / filtering as expected but if i change criteria & rebuild the table, it is giving me javascript error as "'oFeatures' is null or not an object" when i try to apply filter by select/deselect any checkbox (with second load onwards).
Below code which is used to generate datatable with filter options after getting json result from server & html getting appended to #resultTable
[code]
var resultTable = $("#resultTable").dataTable({
"bAutoWidth": false,
"bFilter": true,
"bJQueryUI": false,
"oSearch": { "bSmart": false },
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"iDisplayLength": 50,
"aoColumns": [
{ sWidth: "10px" }
, { sWidth: "200px" }
, { sWidth: "210px" }
, { sWidth: "50px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "50px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "50px" }
]
}).columnFilter({
"sPlaceHolder": "head:after",
"aoColumns": [
null,
null,
{ type: "checkbox" },
{ type: "checkbox" },
{ type: "checkbox" },
null,
null,
null,
{ type: "checkbox" },
null,
null,
null
]
});
[/code]
furthermore, [code] #resultTable [/code] & html is been created on the fly based on json response from server.
So far:
I tried applying various options before re-loading datatable like below..
[code]
$("#resultTable").dataTable().fnUpdate();
$("#resultTable").dataTable().fnFilterClear();
[/code]
But no luck yet..!! :( , it works well with select (dropdown)... unable to trace what is wrong with checkbox options,
Any help would be greatly appreciated!
Thank you!
Jay
jquery.dataTables.js 1.9.4
jquery.dataTables.columnFilter.js 1.5.1.
I'm having issue with reinitializing jquery datatable when any search criteria changes with the click of show result button.
It works fine with first load & doing sorting / filtering as expected but if i change criteria & rebuild the table, it is giving me javascript error as "'oFeatures' is null or not an object" when i try to apply filter by select/deselect any checkbox (with second load onwards).
Below code which is used to generate datatable with filter options after getting json result from server & html getting appended to #resultTable
[code]
var resultTable = $("#resultTable").dataTable({
"bAutoWidth": false,
"bFilter": true,
"bJQueryUI": false,
"oSearch": { "bSmart": false },
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
"iDisplayLength": 50,
"aoColumns": [
{ sWidth: "10px" }
, { sWidth: "200px" }
, { sWidth: "210px" }
, { sWidth: "50px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "50px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "80px" }
, { sWidth: "50px" }
]
}).columnFilter({
"sPlaceHolder": "head:after",
"aoColumns": [
null,
null,
{ type: "checkbox" },
{ type: "checkbox" },
{ type: "checkbox" },
null,
null,
null,
{ type: "checkbox" },
null,
null,
null
]
});
[/code]
furthermore, [code] #resultTable [/code] & html is been created on the fly based on json response from server.
So far:
I tried applying various options before re-loading datatable like below..
[code]
$("#resultTable").dataTable().fnUpdate();
$("#resultTable").dataTable().fnFilterClear();
[/code]
But no luck yet..!! :( , it works well with select (dropdown)... unable to trace what is wrong with checkbox options,
Any help would be greatly appreciated!
Thank you!
Jay
This discussion has been closed.