columnFilter Plugin: How to exclude columns? (to avoid wrong column filter index)
columnFilter Plugin: How to exclude columns? (to avoid wrong column filter index)
I just implemented Drill Down rows (http://www.datatables.net/blog/Drill-down_rows) on a datatable with the columnFilter plugin. The Drill Down rows require a column to be inserted for the open/close buttons. How can I exclude this column from the list of searchable rows by the columnFilter plugin? I've already excluded the column from global filtering with "bSearchable".
My aoColumns:
[code]
"aoColumns" : [
{
"mDataProp" : null,
"mData" : null,
"bSortable" : false,
"bSearchable" : false, // exclude from global filtering
"sClass" : "control center",
"sDefaultContent" : ''
},
{
"mDataProp" : "browser",
},
{
"mDataProp" : "engine"
},
],
[/code]
Now, when i search the "browser" column, the column index is "sSearch_1" (it should be "sSearch_0" though, since the first column can't be searched). I tried adding a 'null' value for this column in the columnFilter() initialization but this doesn't solve the problem.
[code]
$('#example').dataTable().columnFilter(
{
"aoColumns" : [
null,
{type: "text"},
{type: "text"}
]
}
);
[/code]
Any help would be very much appreciated!
My aoColumns:
[code]
"aoColumns" : [
{
"mDataProp" : null,
"mData" : null,
"bSortable" : false,
"bSearchable" : false, // exclude from global filtering
"sClass" : "control center",
"sDefaultContent" : ''
},
{
"mDataProp" : "browser",
},
{
"mDataProp" : "engine"
},
],
[/code]
Now, when i search the "browser" column, the column index is "sSearch_1" (it should be "sSearch_0" though, since the first column can't be searched). I tried adding a 'null' value for this column in the columnFilter() initialization but this doesn't solve the problem.
[code]
$('#example').dataTable().columnFilter(
{
"aoColumns" : [
null,
{type: "text"},
{type: "text"}
]
}
);
[/code]
Any help would be very much appreciated!
This discussion has been closed.