0

I have two SQL tables

In table 1 every row have value(string) in System Code column

In table 2 every row have value(int) in Device column which is ID of related Table 1 row.

Now i want to display Table 2 in WPF DataGrid and in Device Column value of System Code from Table 1. Now it's displaying ID of Table 1 row.

How can i do this?

4

1 回答 1

0

Just create new class for the itmes, where you can store all needed properties. In your case it will be the projection of the join.

DataGrid's DisplayMemberPath relates only to the corresponding item. If data item which stands for representation of table's row allows naviagation to the property SystemCode of the Table1 then it is ok.

于 2013-03-29T19:07:12.023 回答