deleting multiple rows

deleting multiple rows

mihomesmihomes Posts: 150Questions: 19Answers: 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: 61,650Questions: 1Answers: 10,094 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.