Compact Framework does not support LINQ yet. It seems, there is no straight forward way to join two DataTables, other than using DataRelations to establish parent-child relationship between DataTables and getting the ChildRows for each parent row.
My specific scenario contained a master and a child table linked by an ID field, which is unique. So, a left join on the ID would not yield multiple data.
I explored using the DataColumn.Expression property (thanks to http://habibcs.spaces.live.com/blog/cns!57A2E0A241105427!183.entry). After creating the DataTables and the DataRelation between the tables, within the same DataSet, I added an additional column, with the Expression property set to refer the child. With a dataview created using the resulting table, I was able to populate a DataGrid successfully for Windows Mobile 5.0.
DataColumn.Expression only supports aggregates, but I wanted the actual column value, which is a string. I tried with expression “min(Child(data_relationname).child_col_name”. It worked… min is redundant here, but it is needed to pass the syntax check on the expression. Max also should work. If the type is integer, you may use sum or avg etc. It should work fine, as long as the child table does not have multiple entries against the id used in the relation.
