Adding addition data - foreign key id - to 'create' request
Adding addition data - foreign key id - to 'create' request
awaegel
Posts: 2Questions: 1Answers: 0
Hello,
I have a nested datatables scenario when I need to use the editor on the inner, or child data. I have update and and remove functionality working find. When I make a new record, though, I need the id of the parent record to send to the server so it can create a foreign key reference.
Is there a way I can interrupt or override the 'create' function with my own code so I can query my data object to obtain the parent id? Unable to find an example for this scenario.
Thanks!
This discussion has been closed.
Answers
Solved my own problem, though probably not as elegantly as possible.
1. Set a global javascript variable 'parent id'
2. I'm using 'row details' to show/hide the child datatable, so whenever I open a row I grab its ID and set parent_id to that: