views:

282

answers:

1

when using the jquery datatable plugin when you call fnFilter in the datatables plugin, it filters the table but doesn't actually put the value you set in the filter bar. Is there anyway to stick the value you programatically set into the filter bar.

A: 

You could set it manually:

var table = $('table').dataTable();
var filterText = 'some filter text';
table.fnFilter(filterText);
table.prev('.dataTables_filter').find('input:text').val(filterText);
Darin Dimitrov