I want to localize my GridView from xml file which has translation for my GridView headers.
I use next code:
<Window.Resources>
<Style TargetType="{x:Type telerik:GridViewDataColumn}">
<Setter Property="Header" >
<Setter.Value>
<TextBlock Text="{Binding someValue}"/>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<telerik:RadGridView HorizontalAlignment="Left" Name="radGridView1" VerticalAlignment="Top" >
</telerik:RadGridView>
</Grid>
This code not Works and gives exception that TextBlock cannot be cast to the object. I am planning to bind TextBlock to the XmlNode value and get appropriate translation by Header system name