Here, In this article, we are going to discuss, how can we add framework elements in WPF Datagrid's column header. We will add combo box in the header. To add Combobox in the Header of DataGrid we use [GridColumn].Header tag. In the tag we can add any element directly.
<tools:DataGridTextColumn.Header>
<ComboBox x:Name='txtCbo75P' ItemsSource='{StaticResource StringArrayResource}' SelectedIndex='0'></ComboBox>
</tools:DataGridTextColumn.Header>
Now suppose we have to create Grid as below:
In this case for the forth column rather than giving header text directly, we shall use above code
XAML