I am using Windows Application. I have two data tables called “dt1” and “dt2”.
In “dt1” i have some rows like
ID Name Group
1 A1 G1
2 A2 G1
2 A2 G2
3 A3 G2
3 A3 G1
4 A4 G2
5 A5 G2
AND In second table “dt2”,
ID NAME
1 A1
2 A2
3 A3
4 A4
5 A5
6 A6
Now i want rows of “dt2” from filtered row “dt1” say id – 1,2 which is also present in “dt2”.
So basically i want rows for one data table from other data table which is filtered.
Can any one give some idea how to get this?
The most efficient and easiest would be to use
Linq-To-DataSetandjoinboth tables:If you want the result, what is an
IEnumerable(Of DataRow), asDataTable: