Child rows with editor

Child rows with editor

MaikelMaikel Posts: 45Questions: 12Answers: 1

looking at the child row example: https://datatables.net/examples/api/row_details.html

i want to build the same thing, but the child row would again be a datatable with an editor, so i can add/edit/delete rows inside the child row, are there any examples like this as i can seem to make this work.

Maybe i'm making this to complicated but i'm trying to edit a 1 to many relationship, but in the secondary table (the many) we can add rows, and these rows are build out of 5 fields (below is an explanation of the sql tables).

members
- id
- name
- address
- ....

members_year
- id
- member_id
- year
- medical
- payed
- submitted

any help on how to build this would be really handy.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 48,908Questions: 1Answers: 7,131 Site admin

    This blog post might be useful. Is that the sort of thing you are looking for? But perhaps with the child table shown in a child row?

    Thanks,
    Allan

  • MaikelMaikel Posts: 45Questions: 12Answers: 1

    yes thats what i want, but indeed the child table shown in a child row

    not sure how to do this, basically i need a child row and move it around it seems

  • MaikelMaikel Posts: 45Questions: 12Answers: 1

    i have it working with a separated table,
    but running this table as a child row was not yet successful ...

    i just use the <tableId>_wrapper.html() as the child row, but not sure this is the correct way of working

  • allanallan Posts: 48,908Questions: 1Answers: 7,131 Site admin

    Yes, that is basically the idea. This has come up a few times, so I'll write it up as this month's blog post.

    Allan

  • MaikelMaikel Posts: 45Questions: 12Answers: 1

    that would be really cool, as after 3 hours i was unable to make this work :(

  • allanallan Posts: 48,908Questions: 1Answers: 7,131 Site admin

    I'll start work on it tomorrow and should get it published next week.

    Allan

  • MaikelMaikel Posts: 45Questions: 12Answers: 1

    Hi allan, did you have any change to work on this?

  • allanallan Posts: 48,908Questions: 1Answers: 7,131 Site admin
    Answer ✓

    Yes indeed - just published :).

    Allan

  • MaikelMaikel Posts: 45Questions: 12Answers: 1

    Thanks Will go and convert my current system into this one.

Sign In or Register to comment.