Hi @Mansour_Dalir ,
If you want to use DataRelation Class, you can refer to the following code.
Dim dtset As New DataSet
dtset.Tables.Add(dtParent)
dtset.Tables.Add(dtChild)
dtResult.Columns.Add("filter")
dtResult.Columns.Add("words")
Dim relation As New DataRelation("ParentChildRelation", dtParent.Columns("filter"), dtChild.Columns("Filter"))
dtset.Relations.Add(relation)
For Each childRow As DataRow In dtChild.Rows
Dim filterValue As String = childRow("Filter").ToString()
Dim parentRows As DataRow() = childRow.GetParentRows(relation)
For Each parentRow As DataRow In parentRows
dtResult.Rows.Add(parentRow("filter"), parentRow("words"))
Next
Next
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.