Binding the headers

Oct 22, 2012 at 10:17 AM
Edited Oct 22, 2012 at 10:20 AM

Hey!

How I can bind the header?  I have tried:


<ExtendedGridControl:ExtendedDataGrid x:Name="AutomobilesGrid" ItemsSource="{Binding Path=Automobiles}" AutoGenerateColumns="False">
                <DataGrid.Columns>
                    <ExtendedColumn:ExtendedDataGridTextColumn Width="Auto" Binding="{Binding Path=Number}" AllowAutoFilter="False">
                        <ExtendedColumn:ExtendedDataGridTextColumn.HeaderTemplate>
                            <DataTemplate>
                                <TextBlock HorizontalAlignment="Center" Text="{Binding DataContext.Dictionary[AutomobileNumber], RelativeSource={RelativeSource FindAncestor, AncestorType=ExtendedGridControl:ExtendedDataGrid}}"/>
                            </DataTemplate>
                        </ExtendedColumn:ExtendedDataGridTextColumn.HeaderTemplate>
                    </ExtendedColumn:ExtendedDataGridTextColumn>
					...
		</DataGrid.Columns>
</ExtendedGridControl:ExtendedDataGrid>

 


But it doesn't work. If I use a a datagrid from WPF-Toolkit (toolkit=http://schemas.microsoft.com/wpf/2008/toolkit) instead, all headers have a value.

How I can bind the ExtendedDataGrid headers?

Thank you!

Coordinator
Oct 22, 2012 at 5:19 PM

Hi,

 

Can you please post small project where I can reproduce this issue.

 

Mar 19, 2013 at 10:46 AM
Hi,

I am also facing the same issue. I cat change the Header via HeaderTemplate.

Is it possible or not?

Thanks