1. I have a query in LINQ (VB.NET):
Dim Consulta = From ConsultaEmisor In Emisor
From ConsultaReceptor In Receptor
From ConsultaComprobante In Comprobante
Select New With {Mis campos}
2. I fill a grid with the query:
Datagridview1.datasource = Consulta.toList
3 . The query is inside a FOR because I fill my dataset by means of xmls: (In this case only 2)
For cont As Integer = 0 To lista - 1
Dim PathFile As String = ("D:\XML SAT\" & ListBox1.SelectedItem & "\" & ListBox2.Items(cont))
ds.ReadXml(PathFile)
4 . When the data is displayed on the grid in the first round a row is added (It takes the data of my dataset by means of the query LINQ to unite the nodes (datable) of the XML), everything well up there, but in the second round it duplicates them by the amount of "from" that I have in my Consultation, which in this case are 3 From (Issuer, Receiver and Proof)
5 . I can not use a join since no table has a field that I can relate as a primary key.
6 . Does anyone know a way other than the merge method to put my datatable on the grid?
The traditional way is
Datagridview1.datasource = dataset.tables("Tabla1")
Datagridview1.datasource = dataset.tables("Tabla2")
Datagridview1.datasource = dataset.tables("Tabla3")
But the Grid will only fill its columns with the last table that is assigned to the source ...
Already been a long time in this someone could help me?
Greetings!