About Wrapping GridViewDataColumn Header

5 posts, 0 answers
  1. KyungTaek
    KyungTaek avatar
    4 posts
    Member since:
    Dec 2012

    Posted 17 Feb 2013 Link to this post

    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.
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 18 Feb 2013 Link to this post

    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.

  3. KyungTaek
    KyungTaek avatar
    4 posts
    Member since:
    Dec 2012

    Posted 18 Feb 2013 Link to this post

    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.
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 19 Feb 2013 Link to this post

    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.

  5. KyungTaek
    KyungTaek avatar
    4 posts
    Member since:
    Dec 2012

    Posted 19 Feb 2013 Link to this post

    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.
Back to Top