Is it possible to build multiple rows per one line item?

Is it possible to build multiple rows per one line item?

ztaylor1990ztaylor1990 Posts: 27Questions: 10Answers: 0

I was wondering if it is possible to do something like this in Datatables.

I have two database tables set up. One table is where the supplier's bid information is held and the other is where the buyer's information is held. In the buyer's table, the primary key is the lane id. In the supplier's table, the primary key is the lane id and the supplier's name. In our current set up we have a compound key set up so when the supplier inserts a bid it will take the buyer's lane id and associate that in the supplier's table.

What I am wanting is to set up a table where there is one row with the buyer's information on it and the ability to set up more than one row for the supplier's entry just like in the picture above. Can I do this in one table without having to create two tables? The reason for wanting to create one table would be so that the spacing for each row would line up.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736
    Answer ✓

    The HTML Requirements doc states that rowspan and colspan are not supported in the tbody. However you could use Child Detail Rows to show the extra rows. There are ways to always have them open instead of using the button if you wish. Let us know if there are any questions if you choose to use this.

    Kevin

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736

    Take a look at the OP's last example in this thread for an idea of what I'm referring to. It might be overly complex as, IIRC, the OP is trying to merge the rows.

    Kevin

This discussion has been closed.