Hi,
I have a requirment that use customized to change the column header of the datagridcontrol.The source data is a Datatable.Datagridcontrol could adjust different datatable(tables have different amount of column,and column name is not fixed).Now I want to customized the column header cell into two parts---a textblock and a combobox.The textblock's text binds column header and the combobox binds a list that contains strings.When the combobox select a item.The textblock's text could change into selecteditem's content.
Question:
1.How can I bind the column's header to the textblock's text?
2.Can I add a filter into this Cell.?
<Style TargetType="{x:Type xcdg:ColumnManagerCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type xcdg:ColumnManagerCell}">
<WrapPanel Orientation="Vertical">
<TextBlock Name="HeaderTextBox"></TextBlock>
<ComboBox Name="HeaderComboBox"></ComboBox>
</WrapPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>