This is a migrated thread and some comments may be shown as answers.

[Solved] Is it possible to use binding to set header?

2 Answers 34 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrei
Top achievements
Rank 1
Andrei asked on 29 Sep 2014, 08:44 AM
Is it possible to use binding to set header?

<grid:DataGridTextColumn Name="MyColum" PropertyName="MyPropertyName" Header="{Binding Path=Header}"/> - not seems to work.

Thanks

2 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 02 Oct 2014, 05:25 PM
Hi Andrei,

I am afraid this is not supported. DataGridColumn is not a FrameworkElement.

Best regards,
Ves
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andrei
Top achievements
Rank 1
answered on 08 Oct 2014, 02:18 PM
I solved it:

<grid:DataGridTextColumn.Header>
            <TextBlock Text="{Binding ElementName=GridName, Path=DataContext.PropertyName}"/>
</grid:DataGridTextColumn.Header>
Tags
Grid for XAML
Asked by
Andrei
Top achievements
Rank 1
Answers by
Ves
Telerik team
Andrei
Top achievements
Rank 1
Share this question
or