views:

556

answers:

0

Please help.

I have two relational tables which are Employee and EmployeePosition. I am trying to bind two tables into one datagrid on the xmal file without using LINQ to join those two table into one collection from the c# code behind. HOW CAN I DO IT? The sample code and table below

Employee EmployeeID FirstName LastName PositionID

EmployeePosition PositionID Title

My excepted result is:

EmployeeID   FirstName   LastName  Title

Xaml file

        <toolkit:DataGridTextColumn Header="First Name" Width="Auto"  
                                       Binding="{Binding FirstName}"/>

        <toolkit:DataGridTextColumn Header="Last Name" Width="Auto"  
                                       Binding="{Binding LastName}"/>

        <toolkit:DataGridTextColumn Header="Title" Width="Auto"  
                                       Binding="{Binding Title}"/>

The C# Code

var employee = from e in _db.Employees Select e; this.DataGrid.ItemsSource = employee;

Please help Patrick