Duplicate with "Cancel" - Button

Duplicate with "Cancel" - Button

rostrost Posts: 26Questions: 9Answers: 1
edited June 2020 in Free community support

I tried to give a test-case - but the "Duplicate" - button does not work at all (what it does in my local testcase - no idea why - but that's not the problem).

My problem is, that I would like to have a 'Cancel' - button within the duplicate form according to https://editor.datatables.net/examples/api/duplicateButton

I tried according to https://editor.datatables.net/examples/api/cancelButton - but without success.

Could anyone please give me a hint how to do that?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770

    You will need to use the buttons parameter of the create() API. Something like this:
    http://live.datatables.net/guwafemu/75/edit

    Kevin

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770
    Answer ✓

    I tried to give a test-case - but the "Duplicate" - button does not work at all (what it does in my local testcase - no idea why - but that's not the problem).

    Take a look at the browser's console to see this error when clicking Duplicate:

    Uncaught ReferenceError: table is not defined

    You need to use var table. = $("#example").DataTable({...});.

    Kevin

  • rostrost Posts: 26Questions: 9Answers: 1

    Thank you very much!! :-)

This discussion has been closed.