is it possible disable delete on some id?

is it possible disable delete on some id?

unfathomedxinunfathomedxin Posts: 5Questions: 3Answers: 0

Hi is it possible to disable delete on some ID that shows on the table?

my datatable shows a list of accounts and I want to disable the delete button on some of it for example an admin account

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,890Questions: 1Answers: 10,143 Site admin
    Answer ✓

    Currently you would either need to disallow selection of the rows (either by immediately deselecting the row using an select event handler, or using your own event handler to select in the first place), or use preSubmit to check if any of the ids are selected that you don't want to allow to be deleted.

    There currently isn't a nice way of resolving this on the server since the preRemove event on the server-side can't return false to stop the action. That will be coming int he next major version of Editor.

    Allan

  • unfathomedxinunfathomedxin Posts: 5Questions: 3Answers: 0

    thank you very much :) I'll look into that

This discussion has been closed.