I wanted to change the filter labels and localize them,
I used the LocalizationManager and it works fine,
However for three type of data, I'd like to display three type of labels, which are (numerics, DateTime, and strings)
I couldn't manage to localize these different columns with different resource files,
So went through the following solutions :
Solution I
created a new style/Template for the FilteringControl and applied this style to the control as shown bellow:
<ResourceDictionary>
<local:ImageTypeConverter x:Key="imageTypeConverter"></local:ImageTypeConverter><local:ContainsKeywordsIconConverter x:Key="containsKeywordsIconConverter"></local:ContainsKeywordsIconConverter> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Themes/Resources/Dictionaries/FilteringControlStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<telerik:GridViewDataColumn
Header
=
"Date"
UniqueName
=
"Date"
DataMemberBinding
=
"{Binding DateCreation}"
HeaderCellStyle
=
"{StaticResource CustomHeaderCell}"
>
<
telerik:GridViewDataColumn.FilteringControl
>
<
telerik:FilteringControl
></
telerik:FilteringControl
>
</
telerik:GridViewDataColumn.FilteringControl
>
</
telerik:GridViewDataColumn
>
Solution II
Created a new control by copy/pasting the previouse style definition of the FilteringControl as shown bellow
<Border Margin="0,2,0,0" BorderBrush="#FF848484" BorderThickness="1,1,1,1" CornerRadius="1">
<Border Background="#FFE4E4E4" BorderBrush="White" BorderThickness="1">
<StackPanel HorizontalAlignment="Stretch" Margin="5,5,5,5" MaxWidth="350" MinWidth="200" VerticalAlignment="Stretch">
<StackPanel x:Name="PART_DistinctFilter" Visibility="Visible">
........Up to the end,
But here I must redefine all actions of the controls, (Onfilter, onclear, selectAll and so on...)
Is there some missing thing I could add in either one of both solutions to overcome the corresponding shortcut ? or I must continue in the second solution by codding all necessary actions ? which seems to be a bit heavy for just localizing differents columns filters with different resources files,
Thanks in advance for your help,
Abdelkader