schneeflocke
Top achievements
Rank 1
schneeflocke
asked on 06 Apr 2010, 05:41 PM
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.
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.
7 Answers, 1 is accepted
0
Accepted
Hi Stefan Walter,
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.
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.
0
Jonx
Top achievements
Rank 2
answered on 06 Oct 2010, 05:07 PM
Hello Milan,
Just what I needed, thank you.
But why is that string not alread translated with the rest of the strings?
Just what I needed, thank you.
But why is that string not alread translated with the rest of the strings?
0
schneeflocke
Top achievements
Rank 1
answered on 06 Oct 2010, 06:45 PM
Hi John,
look at this thread http://www.telerik.com/community/forums/silverlight/gridview/french-translation-using-localizationmanager-missing-key.aspx
Best Regards
look at this thread http://www.telerik.com/community/forums/silverlight/gridview/french-translation-using-localizationmanager-missing-key.aspx
Best Regards
0
Jonx
Top achievements
Rank 2
answered on 06 Oct 2010, 09:21 PM
Vielen Dank schneeflocke ;)
0
DANIIl
Top achievements
Rank 1
answered on 28 Apr 2015, 11:16 AM
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.
0
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:
You can set the Foreground property of the TextBlock element per your requirements.
I hope this helps.
Best Regards,
Stefan
Telerik
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.
0
DANIIl
Top achievements
Rank 1
answered on 30 Apr 2015, 10:44 AM
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