I have 2 tables:
Person:
p_id
p_name
c_id
Car:
c_id
c_name
Here is my XAML tag:
<DataGrid Name="dataGrid1"
ItemsSource="{Binding Path=myPath}"
AutoGenerateColumns="True" />
And here is the C#:
a = new SqlDataAdapter("SELECT p.p_name AS Person, c.c_name AS Car FROM Person AS p, Car AS c WHERE p.c_id = c.c_id", c);
d = new DataSet();
a.Fill(d, "myPath");
dataGrid.DataContext = d;
Sure I can view but I cannot edit the data. I hope by some "Magic" I can turn the Car-TextColumn into a ComboBox
with the Item list from the Car
table.
Sorry if this question was asked, this is the first time I am trying C# and WPF, not sure what keywords to search!