Reputation: 382
I have two tables A and B. B has a column C with integer values. For one row in A there can be more rows in B. The rows of B are related to elements of A with the primary index of A. Now I want to display in a DataGridView
of A in a column all values C which are related to the row of A.
Example:
Table A has rows with key 1, 2, 3
Table B has rows A(1), B(1), C(2), D(2), E(2), F(3) where ABC is the integer value and (x) is the key relation. So the DataGridView
should look like:
A_Row1Col1Value, A_Row1Col2Value, B_"A; B"
A_Row2Col2Value, A_Row2Col2Value, B_"C; D; E"
A_Row3Col1Value, A_Row3Col2Value, B_"F"
whereby instead of ';' another separator character could also be used.
Could this be solved with the SQL-SELECT
of the TableAdapter
?
Upvotes: 0
Views: 28