Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
705
XamGrid HeaderTemplate and HeaderText
posted

Hi,

this is my code:

<ig:XamGrid ItemsSource="{Binding MySource}" AutoGenerateColumns="False">
    <ig:XamGrid.Columns>
        <ig:TextColumn Key="ID" HeaderText="Test" IsReadOnly="True" HeaderTemplate="{StaticResource myTemplate}" />
        </ig:XamGrid.Columns>
    </ig:XamGrid>

And this is my template:

<DataTemplate x:Key="myTemplate">
    <StackPanel Orientation="Horizontal">
        <TextBlock Text="{Binding }" />
        <TextBlock Text="NEW" FontSize="8" Margin="2,0,0,0" Foreground="#FF6394B7" />
    </StackPanel>
</DataTemplate>

If I use this, the actual headertext is ID but it should be Test.
So, how can I bind the text in the TextBlock object to the headertext property?

Parents Reply Children
No Data