I'd like to put a property of a combobox in a textbox on a datagrid.
Combo in a datagrid defined like so:
Xaml:
<DataGridTemplateColumn x:Name="cboPartBCPT" Header="CPT Code" Width="100" ><DataGridTemplateColumn.CellTemplate><DataTemplate><TextBlock Text="{Binding CPT}" /></DataTemplate></DataGridTemplateColumn.CellTemplate><DataGridTemplateColumn.CellEditingTemplate ><DataTemplate><ComboBox x:Name="cboPartBCPT" ItemsSource="{Binding Source = {StaticResource PartB_CPTLookup}}" SelectedValue="{Binding Path=CPT}" SelectedValuePath="CPT" DisplayMemberPath="CPT" IsSynchronizedWithCurrentItem="True"></ComboBox></DataTemplate></DataGridTemplateColumn.CellEditingTemplate></DataGridTemplateColumn><DataGridTextColumn x:Name="PartBProcedure" Header="Procedure" Width="200" Binding="{Binding SelectedItem.ProcedureName, ElementName=cboPartBCPT}" />
PartBProcedure is always blank. What am I doing wrong?
Thanks.