I
Ivan
Hi,
I've got a problem with a query I make using Linq. The problem is that I
want to show the results in a DataGridView. Until now I had used it without
problems using CopytoDataTable(), but this time this method is not
appliable, it doesn't exist as a method for this query...
This is the code from the query
*******************************************
Dim Source= ds.Tables(0).AsEnumerable()
Dim Change = ds.Tables(1).AsEnumerable()
Dim query = _
From f In Source _
Group Join c In Change On _
f.Field(Of String)("Name") Equals c.Field(Of String)("Name") _
Into children = Group _
From child In children.DefaultIfEmpty() _
Select New With _
{ _
..Order = f.Field(Of Integer)("Order"), _
..Name = f.Field(Of String)("Name"), _
..FPosition = f.Field(Of String)("Position"), _
..cPosition = child.Field(Of String)("Position") _
}
DataGridView1.DataSource = query.CopytoDataTable()??**
************************************************
**Here is where it fails. Until now, with easier queries, i could apply this
method, but this time it seems as it's not implemented...
CAN ANYBODY HELP MEEEEEEE!!??
Thanks in advance!
I've got a problem with a query I make using Linq. The problem is that I
want to show the results in a DataGridView. Until now I had used it without
problems using CopytoDataTable(), but this time this method is not
appliable, it doesn't exist as a method for this query...
This is the code from the query
*******************************************
Dim Source= ds.Tables(0).AsEnumerable()
Dim Change = ds.Tables(1).AsEnumerable()
Dim query = _
From f In Source _
Group Join c In Change On _
f.Field(Of String)("Name") Equals c.Field(Of String)("Name") _
Into children = Group _
From child In children.DefaultIfEmpty() _
Select New With _
{ _
..Order = f.Field(Of Integer)("Order"), _
..Name = f.Field(Of String)("Name"), _
..FPosition = f.Field(Of String)("Position"), _
..cPosition = child.Field(Of String)("Position") _
}
DataGridView1.DataSource = query.CopytoDataTable()??**
************************************************
**Here is where it fails. Until now, with easier queries, i could apply this
method, but this time it seems as it's not implemented...
CAN ANYBODY HELP MEEEEEEE!!??
Thanks in advance!