0
我在這個數據網格列WPF綁定DataGridComboBoxColumn從代碼
<DataGrid.Columns>
<DataGridComboBoxColumn SelectedItemBinding="{Binding Path=ProductId}" DisplayMemberPath="Name" SelectedValuePath="Id" />
<DataGridTextColumn Binding="{Binding Path=StorageAmount}" Width="*" Header="Со склада" />
<DataGridTextColumn Binding="{Binding Path=Trade1Amount}" Width="*" Header="С точки 1" />
<DataGridTextColumn Binding="{Binding Path=Trade2Amount}" Width="*" Header="С точки 2" />
<DataGridTextColumn Binding="{Binding Path=TotalAmount}" Width="*" Header="Всего" FontWeight="Bold" />
</DataGrid.Columns>
我如何可以綁定DataGridComboBoxColumn編程方式從代碼,而不是從XAML?我不能定義名稱到DataGridComboBoxColumn所以我不能爲了填補這一組合框