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

About Wrapping GridViewDataColumn Header

4 Answers 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
KyungTaek
Top achievements
Rank 1
KyungTaek asked on 18 Feb 2013, 01:59 AM
Hello,

Now I'm working on localization about DataGrid. And I'm using WPF Localization Extension for multi-language supporting.
At this time I need to change texts for each headers, but It doesn't work.
Below is my code for localization.

<telerik:GridViewDataColumn DataMemberBinding="{Binding}" HeaderCellStyle="{StaticResource  GridViewHeaderCellBasic}">
    <telerik:GridViewDataColumn.Header>
        <TextBlock Text="{lex:Loc LINETOTAL}" TextWrapping="Wrap" />
    </telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>

In the above code, {lex:Loc LINETOTAL} means multi-lange ID for Localization. The text of Column header should changed to above text which is linked to LINETOTAL.
But the header text is not showing.

Can you help me out for this problem?

Thank you.

4 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 18 Feb 2013, 07:38 AM
Hello KyungTaek,

I would recommend you to check out this demo for a reference. 

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
KyungTaek
Top achievements
Rank 1
answered on 18 Feb 2013, 11:06 AM
Dear Maya,

I've already read those article, and it does not meet our requirement.
I know that telerik control already has a localization feature but I couldn't find how to change head colume text of DataGrid.
As described above 'wrapping' head's textblock is not working well.
Do you have any solution for resolve this problem?

Thank you.
0
Maya
Telerik team
answered on 19 Feb 2013, 03:13 PM
Hi KyungTaek,

Did you check out the German localization of the grid and that column headers are translated as well ? This is what I meant when pointing you to this example. 
Still, since Header property of the column is object, you can try inserting TextBlock for example and bind its Text property in the property for your localization-mechanism way. Do you have troubles with the implementation of this approach ? Does your localization work outside the grid ? 
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
KyungTaek
Top achievements
Rank 1
answered on 19 Feb 2013, 10:59 PM
Hi,

I'll check out the german localization.
And for inserting TextBlock is not working well. When design time, it's showing localized text well... But when I close the Visual Studio, and restart it, the text will not be shown. I think something will overlap my localized text. I'll look into it again also.

Thank you.
Tags
GridView
Asked by
KyungTaek
Top achievements
Rank 1
Answers by
Maya
Telerik team
KyungTaek
Top achievements
Rank 1
Share this question
or