TableTools function FnSelectAll(true) with Select extension

TableTools function FnSelectAll(true) with Select extension

jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0

Hi Allan
How can implement function "fnSelectAll(true)" (Select only filtered rows ) of Tabletools using extension Select 1.0.1 ?

Replies

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75
    edited October 2015

    Im not @allan, but I would highly suggest phasing out TableTools, anything TableTools has is now deprecated, and replaced by other (more superior) extensions.

    You are using TableTools right? What you're saying is a little confusing... Select only filtered rows "of Tabletools", do you mean select only filtered rows within DataTables, using the Select extension?

    If so, just use a row-selector, I was able to accomplish it via:

    table.rows({ page: 'current' }).select();
    

    Heres an example, just search for something like Tiger Nixon, click the Select Visible button, then clear the search/filter, the row should still be selected

  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin

    Select all with Select can be done by simply using table.rows().select() since rows() without a selector will gather all rows in the table.

    jLinux's suggestion implements select all, on the current page, and nicely shows how powerful the new API can be for performing exactly the actions you wish.

    Allan

This discussion has been closed.