Deleting a row without calling fnDeleteRow()?

Deleting a row without calling fnDeleteRow()?

xrcr9709xrcr9709 Posts: 4Questions: 0Answers: 0
edited February 2014 in General
Hello,

In my code it easier to delete a row by selecting the tr element with jQuery and simply removing it.
Is there anything about the DataTables that I'd be missing by doing so instead of calling fnDeleteRow()?

Thank you

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Yes - DataTables wouldn't know that the row has been deleted - so next time it redraws, the row would be added back in.

    You can use the new `rows().remove()` method in 1.10 if you want to pass in a jQuery object or selector to select the row: http://next.datatables.net/reference/api/rows().remove() .

    Allan
This discussion has been closed.