Filters based on hidden columns
Filters based on hidden columns
madhu
Posts: 2Questions: 0Answers: 0
Hi friends thank you for the great data table plugin. I have to filter my table based on hidden columns. I tried to use the api oTable.fnVisibleToColumnIndex(); to change the column index but no welfare. Can you give me a detail example on the above mentioned function?
This discussion has been closed.
Replies
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
DataTables example
@import "datatables/media/css/demo_table.css";
$(document).ready(function() {
$.fn.dataTableExt.oApi.fnVisibleToColumnIndex = function ( oSettings, iMatch )
{
return oSettings.oApi._fnVisibleToColumnIndex( oSettings, iMatch );
}
$('#example').dataTable( {
"aoColumnDefs": [
{ "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] }, { "bVisible": false, "aTargets": [ 3 ] }] } ).columnFilter(
{
"bJQueryUI": true,
sPlaceHolder: "head:before",
aoColumns:[{ type: "text" ,sSelector: "#filter1" },{type:"text" ,sSelector: "#filter2"},{type:"text",sSelector: "#filter3"},{type:"text",sSelector: "#filter4"},{type: "text",sSelector: "#filter5"}]
}
);
$('#but').click(function()
{
oTable.fnVisibleToColumnIndex();
});
} );
refresh
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
Trident
Internet Explorer 4.0
Win 95+
4
X
Trident
Internet Explorer 5.0
Win 95+
5
C
Trident
Internet Explorer 5.5
Win 95+
5.5
A
Trident
Internet Explorer 6
Win 98+
6
A