delete confirmed row
delete confirmed row
alex9134
Posts: 12Questions: 6Answers: 0
i need to select a row to delete.the actual delete row depends on the user confirming removal of alertid which resides in column 2 of the tabe. how do I do that? i tried using table.row() functions but i think that functionality depends on installing editor functions. Am I correct?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
No it does not. Your delete button on the data table just needs to execute a confirmation dialog. If the use confirms, use the table.row() stuff to delete.
After the delete, you need to redraw the table for the row to disappear.
Yep, as @bindrid said, it's not dependent on Editor. Just use
row().remove()
to remove,Cheers,
Colin
do you have examples of confirm delete?
Sorry, no. That's the vanilla JS part - so you could google that.
You will have to research how to do a modal for the client side foundation you are using (jQuery UI, Bootstrap, or what ever).
or you can fall back to the built-in confirm dialog.