DT 1.10 - Button and search

DT 1.10 - Button and search

deliatordeliator Posts: 95Questions: 1Answers: 0

Hello,

In this example i need to put the data attribute of the button with the testBtn class in the search field of the table

http://live.datatables.net/kesezuvu/3/

How can i do this ?

regards,

marc

Replies

  • allanallan Posts: 61,722Questions: 1Answers: 10,108 Site admin

    Hi marc,

    Use the search() method to apply a search term to the table - e.g. in this case:

    table.search( id ).draw();
    

    Allan

  • deliatordeliator Posts: 95Questions: 1Answers: 0
    edited November 2017

    Thanks Allan, as usual you are the mirror of efficiency :-)

    One question, if I want the search to be done on a specific column ? e.g. in my case the second column ... ?

    http://live.datatables.net/kesezuvu/6/

  • deliatordeliator Posts: 95Questions: 1Answers: 0

    Ok, answer to myself ...

    oTable.columns( 3 ).search( id ).draw();

    ;-)

This discussion has been closed.