I have a LINQ query to which I concatenate the values of a table in a single field to show in DataGridView
Dim Consulta = (From ConsultaConceptos In ds.Tables("Concepto")
Select New With { _
.Concepto = "Cantidad: " & ConsultaConceptos.Field(Of String)("cantidad") & " ValorUnitario: " & ConsultaConceptos.Field(Of String)("valorUnitario") & " importe: " & ConsultaConceptos.Field(Of String)("importe") & " Descripción: " & ConsultaConceptos.Field(Of String)("descripcion")
})
DataGridView1.DataSource = Consulta.ToList
The fact is that in the table Concepto
there can be more than one row, unlike those in more tables that always have only 1.
Example:
____________Concepto_______________
dato dato dato dato fila1
__________________________________
dato dato dato dato fila2
__________________________________
dato dato dato dato fila3
What I want to do is the following:
Show rows 1, 2 and 3 in one
____________Concepto_______________
dato dato dato dato dato dato dato dato dato dato dato dato fila 1
I know in advance that this is possible because it is already done in an existing system.