change/translate text "Click here to add new item"

8 posts, 1 answers
  1. schneeflocke
    schneeflocke avatar
    31 posts
    Member since:
    Jan 2010

    Posted 06 Apr 2010 Link to this post

    Hi,

    just want to ask about how can I change the text displayed at the first row of the grid if I enabled the "Show Insert Row" property.
    The text which appears currently is "Click here to add new item". Just want to be able to translate the text in e.g. german.

    Thanks for your support.
  2. Answer
    Milan
    Admin
    Milan avatar
    1989 posts

    Posted 12 Apr 2010 Link to this post

    Hi Stefan Walter,

    There is not problem to localize this text - you just have to define the localized strings in a resource file and use our LocalizationManager to replace the default strings with the localized ones. Here you can find more information about our LocalizationManager.

    The name of the resource that you like localize is "GridViewAlwaysVisibleNewRow".


    Regards,
    Milan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 06 Oct 2010 Link to this post

    Hello Milan,
    Just what I needed, thank you.

    But why is that string not alread translated with the rest of the strings?
  5. schneeflocke
    schneeflocke avatar
    31 posts
    Member since:
    Jan 2010
  6. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 06 Oct 2010 Link to this post

    Vielen Dank schneeflocke ;)
  7. DANIIl
    DANIIl avatar
    14 posts
    Member since:
    Apr 2015

    Posted 28 Apr 2015 in reply to Milan Link to this post

    Hello Milan.

    Can you help me. How can I change the text color of the string: "Click here to add new item".

    I'll be grateful for the help.

  8. Stefan X1
    Admin
    Stefan X1 avatar
    521 posts

    Posted 30 Apr 2015 Link to this post

    Hello DANIIl,

    The recommended approach for such customizations is to modify the template of the control using Implicit styles with NoXAML binaries. You can check the Setting a Theme(Using Implicit Styles) documentation article for further reference.

    In Telerik.Windows.Controls.GridView.xaml file please search for the ControlTemplate with x:Key="GridViewNewRowTemplate". Within it you should be able to find the following Border element:
    <Border x:Name="PART_AlwaysVisibleNewRow"
            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
            Margin="0"
            BorderThickness="1 1 1 2"
            BorderBrush="{StaticResource ControlInnerBorder}"
            Background="{TemplateBinding Background}"
            Grid.Column="2"
            Grid.ColumnSpan="2">
        <TextBlock
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                Margin="{TemplateBinding Padding}"
                telerik:LocalizationManager.ResourceKey="GridViewAlwaysVisibleNewRow"/>

    You can set the Foreground property of the TextBlock element per your requirements.

    I hope this helps.

    Best Regards,
    Stefan
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  9. DANIIl
    DANIIl avatar
    14 posts
    Member since:
    Apr 2015

    Posted 30 Apr 2015 in reply to Stefan X1 Link to this post

    Thank you, it is work

    But I rewrote Template for GrigViewNewRow, to set it;s style.  In override Teplate i set Froeground for PART_AlwaysVisibleNewRow

    Thank's for help, Stefan

Back to Top
DevCraft banner