Different Action on Delete

QuestionsDifferent Action on Delete
S19K15 asked 2 years ago

Using the Grid, i can set up some events for user operations like:

-$e["on_insert"] = array("prac_add_student", null, true);
-$e["on_update"] = array("prac_update_student", null, true);
-$e["on_delete"] = array("prac_delete_student", null, true);

When i have a custom delete function the delete operation happens whatever i have in the custom delete function.

The requirement is to change a flag in database field from 0 as existing to 1 as deleted and not delete the record when delete icon is pressed.

Can this be done?


1 Answers
Abu Ghufran answered 2 years ago

Set: $e["on_delete"] = array("prac_delete_student", null, false);

You need to set 3rd param to false. This will stop default grid operation.

Your Answer

8 + 10 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!