delete confirmed row

delete confirmed row

alex9134alex9134 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

Answers

  • Bindrid2Bindrid2 Posts: 79Questions: 4Answers: 12

    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.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Yep, as @bindrid said, it's not dependent on Editor. Just use row().remove() to remove,

    Cheers,

    Colin

  • alex9134alex9134 Posts: 12Questions: 6Answers: 0

    do you have examples of confirm delete?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Sorry, no. That's the vanilla JS part - so you could google that.

  • Bindrid2Bindrid2 Posts: 79Questions: 4Answers: 12
    Answer ✓

    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.

This discussion has been closed.