Parent-Child-Grandchild

Parent-Child-Grandchild

gsheffieldgsheffield Posts: 3Questions: 1Answers: 0

I'm attempting to take the parent-child example one step further by opening a grandchild table when a row in the child table is selected.

My test case is here: http://sprintingpress.com/customersinline.html

Select John Doe from Customers to reveal the Jobs table. Selecting Job ID 1 (ORC240A) from Jobs table should reveal Jobitems table (there is one record in jobitems related on job id 1).

customers.id = jobs.customerid
jobs.id = jobitems.jobid

Dev tools shows selecting a row in Jobs posts to jobitems.php, but no form data is in the request (I would expect it to post "jobid: 1"). Sometimes Chrome reports the status of the request as "canceled" with no response at all, other times an empty data set is returned.

Examining the customersTable and jobsTable objects in the console seems to show there is data bound to selected.data() in the first case but not the second. Any ideas about why?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    edited August 2021

    I see you're using Editor in your example, but our accounts aren't showing that you have a license. Is the license registered to another email address? Please can let us know so we can update our records and provide support.

    Thanks,

    Colin

  • rf1234rf1234 Posts: 3,021Questions: 88Answers: 421

    Examining the customersTable and jobsTable objects in the console seems to show there is data bound to selected.data() in the first case but not the second. Any ideas about why?

    Yes, that's true. I was surprised to see that "jobid" isn't posted to the server.

    Everything looks fine as far as I can tell. I am doing similar things all the time - and it is always working ...

    Sorry to be of no help here ...

    Maybe @allan or @kthorngren can help?!

  • gsheffieldgsheffield Posts: 3Questions: 1Answers: 0

    Editor license purchased.

  • kthorngrenkthorngren Posts: 21,443Questions: 26Answers: 4,974
    Answer ✓

    Did some debugging and found this:

    Looks like you need to change d.jobid = selected.data().id; to d.jobid = selected.data().jobs.id;.

    Kevin

  • gsheffieldgsheffield Posts: 3Questions: 1Answers: 0

    Thanks, that worked!

Sign In or Register to comment.