I have two tables as follow:
Table 1:- Students -> contain all info about students.
Table 2:- Marks-> contain students mark
I would like to remove student_id from Table 2 (Marks) when delete student row from Table 1 (Students).
There are two way you can go.
You could either do that in the server-side script, using events to update the second table directly.
Or, you could do something similar on the client if both tables are present on the page. You would use submitSuccess to trigger the event, then use rows().every() to scan the rows in the second table, using row().data() to get the data to make sure they match, and if so, call remove() to delete from the server.
Hope that helps, shout if you need a working example of the latter,
Thanks alot colin
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.