I have a datagrid with a column containing a ComboBox. I've set the Name for my combobox, but this name is not visible in code, why?
<DataGrid ...>
<DataGrid.Columns>
<DataGrid.TemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox Name="mex" Style="{DynamicResource ComboBoxStyle}"
ItemsSource="{Binding Path=combolist}"
SelectionChanged="status_SelectionChanged" Height="auto" Width="Auto">
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGrid.TemplateColumn>
...
</DataGrid.Columns>
</DataGrid>
In C# code mex is empty, not visible, why?
I tried x:Name="mex" as well, but it is still not visible.
c#:
mex.ItemsSource = dt;
undifined mex