filter with outside button - version 1.9.4

filter with outside button - version 1.9.4

olalaolala Posts: 7Questions: 3Answers: 1

I'm using version 1.9.4 (i have to use this version because i have changed something), how can I filter dataTable with a button same that => http://jsfiddle.net/hssLzgcg/ or http://newsonaut.com/datatable/#

Thanks so much!

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Answer ✓

    The Buttons extension won't work with 1.9 or earlier. You would need to use a custom TableTools button (which will work with 1.9), which will call the legacy fnFilter method to do the filtering you need.

    I'm afraid that neither TableTools nor DataTables 1.9 are supported any longer though.

    Allan

  • olalaolala Posts: 7Questions: 3Answers: 1

    thank you so much !!!!!!

  • olalaolala Posts: 7Questions: 3Answers: 1

    and i have another question with fnFilter, how can I negative filter that filter all values that do not have string 'AAA'
    i have tried fnFilter('^(?:(?!AAA).)*$') but not successfully

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794
    Answer ✓

    I believe you need to enable regex like this:
    fnFilter('^(?:(?!AAA).)*$', true, false)

    Here is the docs:
    https://legacy.datatables.net/ref#fnFilter

    Kevin

This discussion has been closed.