deleting multiple rows

deleting multiple rows

mihomesmihomes Posts: 165Questions: 23Answers: 0
edited April 2014 in DataTables 1.10
Is it possible to pass an array for deleting multiple rows?

selected = ["#97", "#98", "#99", "#101", "#103", "#105", "#106"];
dt.rows(selected).remove().draw( false );

or does it need to be comma separated as :

dt.rows('#97', '#98', '#99', '#101', '#103', '#105', '#106').remove().draw( false );

EDIT : Figured this one out.

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    For anyone else reading this, yes is the answer. An array as shown will work, or a string such as `'#97, #98, ...'` since the `rows()` selector provides the ability to use a jQuery selector.

    Allan
This discussion has been closed.