how to bind combobox of wpf datagrid
A:
For example:
<tk:DataGrid x:Name="dgProducts" DataContext="GoodsCollection" IsSynchronizedWithCurrentItem="True" >
<tk:DataGrid.Columns>
<tk:DataGridComboBoxColumn Header="Good Name"
x:Name="dgCbProduct"
TextBinding="{Binding Path=GoodID, Converter={StaticResource GoodIDToGoodNameConverter}}"
SelectedValuePath="GoodName"
DisplayMemberPath="GoodName">
</tk:DataGridComboBoxColumn>
</tk:DataGrid.Columns>
</tk:DataGrid>
Victor
2010-03-27 10:29:47
I'd bind the object collection to ItemsSource instead of DataContext, personally.
Benny Jobigan
2010-03-27 10:50:36