I need to figure out how to pass a row to a ComboBox inside a TemplateColumn DataGrid . The idea is that whenever I double-click on the TextBox a Popup icon and I select from it the new TextBox content ( ComboBox inside a Popup ).
Xaml
<DataGridTemplateColumn Header="unit"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBox Text="{Binding unit}" MouseDoubleClick="TextBox_MouseDoubleClick_1" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <Popup Name="unitpop" StaysOpen="True" VerticalOffset="-20" HorizontalOffset="30" Placement="Mouse" > <Grid Width="100" Height="20" Background="Transparent" > <ComboBox x:Name="unit_combo" ItemsSource="{Binding Source={StaticResource UnitListData}}" DisplayMemberPath="Name" SelectedValuePath="idunit" IsReadOnly="True" SelectionChanged="unit_combo_SelectionChanged" /> </Grid> </Popup>
source share