Topic: 'FOREIGN KEY constraint failed' on Editable Grid?

Editable grid lets user delete a grid record without the need of delete button it seems.
I cannot catch 'FOREIGN KEY constraint failed' message to replace it with custom one when using editable grid.
How can I do it please?

Adam
God... please help me become the person my dog thinks I am.

Re: 'FOREIGN KEY constraint failed' on Editable Grid?

In the current version you can't to replace this message if you want delete record without additional button.

Dmitry.

Re: 'FOREIGN KEY constraint failed' on Editable Grid?

In that case, is it possible to delete a record with delete button only and disabling delete key press on editable grid?

Adam
God... please help me become the person my dog thinks I am.

Re: 'FOREIGN KEY constraint failed' on Editable Grid?

Using button, you can check, can you delete the record or not, if not, you can show own message.


First you need to understand, why you get the message "FOREIGN KEY constraint failed"
Foreign key constraint violation means the record you're trying to delete contains references to some other records. It's referential Integrity mechanism.


I made an example for you.
You can't delete group if this group used for foreign key in table Person, so you will see own message.


More info
https://en.wikipedia.org/wiki/Referential_integrity

Post's attachments

Attachment icon Referential integrity.zip 10.86 kb, 417 downloads since 2018-02-14 

Dmitry.

5 (edited by AD1408 2018-02-15 12:39:42)

Re: 'FOREIGN KEY constraint failed' on Editable Grid?

Thanks for the sample project Dmitry.............

Adam
God... please help me become the person my dog thinks I am.