Parent-child rows

Parent-child rows

GMGrayingGMGraying Posts: 12Questions: 6Answers: 1

I have a table with too many fields to be displayed legibly; so I wanted to have the main fields display with the rest as child fields displayed in rows below the parent row when clicked. Vice versa, it would close the child rows on the next click. I am using the dataEditor. I would like to have each field editable regardless of whether it is a parent or child field. A relaed issuse is that I have no idea how an "Add button/Edit button" would work with parent/child rows. My problem is that I have searched and searched and not found a complete example of how to do this (just bits and pieces). Is there a complete example with the css, html, javascript, and buttons? The examples appear to use css classes, but it is unclear to me that the class are actually specified in the table. Thanks for your response.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,871Questions: 1Answers: 10,525 Site admin
    Answer ✓

    I would like to have each field editable regardless of whether it is a parent or child field

    Are you using just the lightbox / modal editing, or inline editing. For the lightbox there shouldn't be any issue doing as you describe - you just need to have the fields defined in the Editor. The inline editing is a deal more tricky.

    A relaed issuse is that I have no idea how an "Add button/Edit button" would work with parent/child rows.

    It would work just like with a normal table without the child rows. The fact that there is a child row display is irrelevant to the Add button (at least as far as I can see - I might be missing something). Likewise with the edit - the only thing would be that you have to select the parent row to edit the data. We could easily add an event hook to select the parent row when clicking on the child row though.

    There isn't a complete example of exactly what you are looking for I'm afraid. The documentation is intentionally written so that it should give individual pieces of knowledge that you can then combine to build what you need, since it would be impossible for me to provide examples for every possible combination.

    Allan

  • GMGrayingGMGraying Posts: 12Questions: 6Answers: 1

    thanks.

This discussion has been closed.