Column Filter plug-in doesn't work after recreating Datatable
Column Filter plug-in doesn't work after recreating Datatable
Hi everyone. I have little problem about recreating my datatable with an ajax call.
What i use;
Datables 1.9.4
Datatables column filter plug-in 1.5.0
What i want;
I have a search page. Every time search button is clicked i get data with ajax call and create datatable on fly according to result i received.
In every ajax call i destroy my existing datatable and re-create it.
My problem;
After destroying my datatable i can create my new datatable without problem but column-filters stop working.
My code;
[code] $("#myTable").dataTable().fnDestroy(true); [/code]
[code]
var dataTable = $("#myTable").dataTable({
bAutoWidth: false,
sPaginationType: "full_numbers",
bJQueryUI: true,
bProcessing: true
});
[/code]
[code]
dataTable.columnFilter(
{
sPlaceHolder: "head:before",
sRangeFormat : '',
aoColumns: [
{
type: "text",
bRegex: true,
bSmart: true
},
{
type: "text",
bRegex: true,
bSmart: true
}
]} );
[/code]
The error i receive;
[quote]
Uncaught TypeError: Cannot read property 'oApi' of null
[/quote]
Thanks for your attention.
What i use;
Datables 1.9.4
Datatables column filter plug-in 1.5.0
What i want;
I have a search page. Every time search button is clicked i get data with ajax call and create datatable on fly according to result i received.
In every ajax call i destroy my existing datatable and re-create it.
My problem;
After destroying my datatable i can create my new datatable without problem but column-filters stop working.
My code;
[code] $("#myTable").dataTable().fnDestroy(true); [/code]
[code]
var dataTable = $("#myTable").dataTable({
bAutoWidth: false,
sPaginationType: "full_numbers",
bJQueryUI: true,
bProcessing: true
});
[/code]
[code]
dataTable.columnFilter(
{
sPlaceHolder: "head:before",
sRangeFormat : '',
aoColumns: [
{
type: "text",
bRegex: true,
bSmart: true
},
{
type: "text",
bRegex: true,
bSmart: true
}
]} );
[/code]
The error i receive;
[quote]
Uncaught TypeError: Cannot read property 'oApi' of null
[/quote]
Thanks for your attention.
This discussion has been closed.
Replies
Allan
https://code.google.com/p/jquery-datatables-column-filter/issues/detail?id=119
All I see when I download it is 0.9 from 2011
Here's the direct link: https://jquery-datatables-column-filter.googlecode.com/svn/trunk/media/js/jquery.dataTables.columnFilter.js
I was on the http://code.google.com/p/jquery-datatables-column-filter/ page and missed the
'External Links' heading where it gives the link to the newest releases. The 'Download' heading choice still has a .9 version.
Was driving me nuts :)