Multi Column Filtering, how to?

Multi Column Filtering, how to?

asdrenasdren Posts: 20Questions: 0Answers: 0
edited September 2013 in Editor
How do I enable Multi Column Filtering on my editor datatables?

I found this:
http://datatables.net/plug-ins/filtering
But where can I find the file: ?

Search within the DataTables-1.9.4 folder but nothing.

This is what I have so far:
[code]
var editor; // use a global for the submit and return data rendering in the examples

$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
"ajaxUrl": "php/browsers.php",
"domTable": "#example",
"fields": [ {
"label": "Browser:",
name": "browser"
}, {
"label": "Orgnr:",
"name": "orgnr"
}, {
"label": "Platform:",
"name": "platform"
}, {
"label": "Version:",
"name": "version"
}, {
"label": "CSS grade:",
"name": "grade"
}
]
} );

$('#example').dataTable( {
"sDom": "Tfrtip",
"sAjaxSource": "php/browsers.php",
"bServerSide": true,
"sServerMethod": 'POST',
"aaSorting": [[ 0, "desc" ]],
"aoColumns": [
{ "mData": "id" },
{ "mData": "datum" },
{ "mData": "orgnr" },
{ "mData": "gsm", "sClass": "center" },
{ "mData": "avtalstid", "sClass": "center" }
],
"oTableTools": {
"sRowSelect": "single",
"aButtons": [
{ "sExtends": "editor_create", "editor": editor },
{ "sExtends": "editor_edit", "editor": editor },
{ "sExtends": "editor_remove", "editor": editor }
]
}
} );
} );
[/code]

How can I enable Multi Column Filtering on the example above?

Thanks in advance

Replies

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin
    The file you refer to is just an example of how that type based filtering include might work - you don't want type based filtering here - you actually what the input controls to be added to the document.

    Have a look at these two examples which do exactly that:

    http://datatables.net/release-datatables/examples/api/multi_filter.html
    http://datatables.net/release-datatables/examples/api/multi_filter_select.html

    Allan
This discussion has been closed.