Single Search for multiple table

Single Search for multiple table

nickmc01nickmc01 Posts: 1Questions: 0Answers: 0
edited November 2013 in General
I currently have a site that has 4 datatables on it. Right now I have to type the filter into the search for each of them. Just wondering if its possible to have a single search field that will apply the filter to all of them at once.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    In DataTables 1.10 you'll be able to do exactly that sort of thing with the new API:

    [code]
    $('div.myTables').DataTable().search( ... );
    [/code]

    (note the capital `D` to get the API instance). 1.10 with this feature is in git in the 1_10_wip branch if you want to try it.

    Otherwise, the this plug-in is what you want for 1.9: http://datatables.net/plug-ins/api#fnFilterAll

    Allan
This discussion has been closed.