I am trying to localize the column headers using the following code for each of the column in the parent and the child gridviews in a hierarchical view.
<telerik:GridViewColumn.Header>
<TextBlock Text="JudgementCode" telerik:LocalizationManager.ResourceKey="JudgementCode"></TextBlock>
</telerik:GridViewColumn.Header>
This works fine for the main grid, but when I expand a row to see its child gridview, the child table column headers are not localized.
Is there something different I need to be doing for hierarchical gridveiw.
<telerik:GridViewColumn.Header>
<TextBlock Text="JudgementCode" telerik:LocalizationManager.ResourceKey="JudgementCode"></TextBlock>
</telerik:GridViewColumn.Header>
This works fine for the main grid, but when I expand a row to see its child gridview, the child table column headers are not localized.
Is there something different I need to be doing for hierarchical gridveiw.
4 Answers, 1 is accepted
0
Hi,
Didie
the Telerik team
In both the cases (for the parent and for the child GridView) the localization should be applied fine. May I ask you to share some additional information on how have you set your custom localization manager?
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0

asp.net
Top achievements
Rank 1
answered on 05 Jul 2012, 04:29 PM
This is the line of code I have in App.cs, constructor
LocalizationManager.Manager = new CustomLocalizationManager();
And my CustomLocalizationManager is simple implementation, it just returns the upper case of the key passed. See below
class CustomLocalizationManager : LocalizationManager
{
public override string GetStringOverride(string key)
{
switch (key)
{
default:
return key.ToUpper();
}
}
}
As mentioned earlier, it works fine with TextBlock, Button, and Column Headers of the main table, but fails for the Column Headers of the child table.
LocalizationManager.Manager = new CustomLocalizationManager();
And my CustomLocalizationManager is simple implementation, it just returns the upper case of the key passed. See below
class CustomLocalizationManager : LocalizationManager
{
public override string GetStringOverride(string key)
{
switch (key)
{
default:
return key.ToUpper();
}
}
}
As mentioned earlier, it works fine with TextBlock, Button, and Column Headers of the main table, but fails for the Column Headers of the child table.
0
Hello,
Didie
the Telerik team
This would be strange. I have attached a sample project showing how the resource is applied. Please check it and let me know what have you done different?
Kind regards,Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0

asp.net
Top achievements
Rank 1
answered on 06 Jul 2012, 11:10 AM
This is going to be interesting. I am using the Text property of the TextBlock as well, so that I can see the header text in design mode. So, in your project I use this line of code in both the parent and child grids.
<TextBlock Text ="JudgementCode" telerik:LocalizationManager.ResourceKey="JudgementCode"></TextBlock>
I did this for both the parent grid and the child grid. Now I see only the parent grid column header translated but not the child grid column header.
<TextBlock Text ="JudgementCode" telerik:LocalizationManager.ResourceKey="JudgementCode"></TextBlock>
I did this for both the parent grid and the child grid. Now I see only the parent grid column header translated but not the child grid column header.