DataTables: checkbox filtering
DataTables: checkbox filtering

I’m using data-tables to display approximately 50 records, I would like to filter the data with a checkbox i.e. if checked only display the records containing GMX
My checkbox is outside the datatable, any pointers much appreciated.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Where do you get the records from?
I assume when using a checkbox that it is not static data but gathered from AJAX...
If it is AJAX then you can simply change the URL for the table supplying a filter parameter...
OTOH if the search string is fixed you could just use:
function filter()
{
var table = $('#example').DataTable();
table.search( 'GMX' ).draw();
}
Here are a couple examples:
Uses a function for the checkbox search:
http://live.datatables.net/vipifute/1/edit
Same example showing how to use a search plugin:
http://live.datatables.net/rosahuka/1/edit
Kevin