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

can not Localization RadGridView Filter options

0 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 27 May 2012, 01:40 AM
When i use the Style like this ,the Filter options(for example is equal to) can not localization normal,but the select All is normal.please help. thanks~~

<
SolidColorBrush x:Key="ControlInnerBorder" Color="White"/>
    <telerik:Office_BlackTheme x:Key="Theme"/>
    <SolidColorBrush x:Key="GridView_IndicatorPrimaryColor" Color="Black"/>
    <telerikData:FilterOperatorConverter x:Key="FilterOperatorConverter"/>
    <DataTemplate x:Key="ActionTemplate">
        <TextBlock Text="{Binding Converter={StaticResource FilterOperatorConverter}}"/>
    </DataTemplate>
    <telerikData:FilterCompositionLogicalOperatorConverter x:Key="FilterCompositionLogicalOperatorConverter"/>
    <DataTemplate x:Key="LogicalOperatorTemplate">
        <TextBlock Text="{Binding Converter={StaticResource FilterCompositionLogicalOperatorConverter}}"/>
    </DataTemplate>
    <ControlTemplate x:Key="FilteringControlTemplate" TargetType="telerik:FilteringControl">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Margin="{TemplateBinding Margin}">
            <Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}">
                <StackPanel HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" MaxWidth="350" Margin="{TemplateBinding Padding}" MinWidth="200" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                    <StackPanel x:Name="PART_DistinctFilter" Visibility="{TemplateBinding DistinctFiltersVisibility}">
                        <Grid>
                            <CheckBox x:Name="PART_SelectAllCheckBox" Content="Select All" IsChecked="{Binding SelectAll, Mode=TwoWay}" Margin="0,2" telerik:LocalizationManager.ResourceKey="GridViewFilterSelectAll"/>
                            <telerik:RadButton x:Name="PART_FilterCloseButton" Grid.Column="1" HorizontalAlignment="Right" Height="13" Margin="0" telerik:StyleManager.Theme="{StaticResource Theme}" VerticalAlignment="Top" Width="13">
                                <Path Data="M4,4L5,4 5,5 4,5z M0,4L1,4 1,5 0,5z M3,3L4,3 4,4 3,4z M1,3L2,3 2,4 1,4z M2,2L3,2 3,3 2,3z M4,0L5,0 5,1 4,1 4,2 3,2 3,0.99999994 4,0.99999994z M0,0L1,0 1,0.99999994 2,0.99999994 2,2 1,2 1,1 0,1z" Fill="{StaticResource GridView_IndicatorPrimaryColor}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Height="6" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="6"/>
                            </telerik:RadButton>
                        </Grid>
                        <ListBox x:Name="PART_DistinctValuesList" ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemsSource="{Binding DistinctValues}" MaxHeight="100" SelectionMode="Multiple" telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VirtualizingStackPanel/>
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <CheckBox Content="{Binding ConvertedValue}" IsChecked="{Binding IsActive, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" VerticalContentAlignment="Center"/>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </StackPanel>
                    <StackPanel Margin="0,2" Visibility="{TemplateBinding FieldFiltersVisibility}">
                        <TextBlock Margin="0,2,0,0" telerik:LocalizationManager.ResourceKey="GridViewFilterShowRowsWithValueThat"/>
                        <telerik:RadComboBox x:Name="PART_Filter1ComboBox" ItemTemplate="{StaticResource ActionTemplate}" ItemsSource="{Binding AvailableActions}" Margin="0,2,0,2" SelectedItem="{Binding Filter1.Operator, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                        <ContentControl x:Name="PART_Filter1ContentControl" DataContext="{Binding Filter1}" HorizontalContentAlignment="Stretch" Margin="0, 2" VerticalContentAlignment="Stretch"/>
                        <!--<telerik:RadComboBox x:Name="PART_LogicalOperatorsComboBox" ItemTemplate="{StaticResource LogicalOperatorTemplate}" ItemsSource="{Binding LogicalOperators}" Margin="0,2" SelectedItem="{Binding FieldFilterLogicalOperator, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                            <telerik:RadComboBox x:Name="PART_Filter2ComboBox" ItemTemplate="{StaticResource ActionTemplate}" ItemsSource="{Binding AvailableActions}" Margin="0,2" SelectedItem="{Binding Filter2.Operator, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}"/>-->
                        <!--<ContentControl x:Name="PART_Filter2ContentControl" DataContext="{Binding Filter2}" HorizontalContentAlignment="Stretch" Margin="0, 2" VerticalContentAlignment="Stretch"/>-->
                    </StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Button x:Name="PART_ApplyFilterButton" Grid.Column="0" Height="22" Margin="0,2,2,2" telerik:LocalizationManager.ResourceKey="GridViewFilter" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                        <Button x:Name="PART_ClearFilterButton" Grid.Column="1" Height="22" Margin="2,2,0,2" telerik:LocalizationManager.ResourceKey="GridViewClearFilter" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                    </Grid>
                </StackPanel>
            </Border>
        </Border>
    </ControlTemplate>
    <SolidColorBrush x:Key="GridView_FilteringControlBackground" Color="#FFE4E4E4"/>
    <SolidColorBrush x:Key="GridView_FilteringControlOuterBorder" Color="#FF848484"/>
    <SolidColorBrush x:Key="ControlForeground" Color="Black"/>
    <Style x:Key="FilteringControlStyle1" TargetType="telerik:FilteringControl">
        <Setter Property="Template" Value="{StaticResource FilteringControlTemplate}"/>
        <Setter Property="Background" Value="{StaticResource GridView_FilteringControlBackground}"/>
        <Setter Property="BorderBrush" Value="{StaticResource GridView_FilteringControlOuterBorder}"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="Margin" Value="0,2,0,0"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Foreground" Value="{StaticResource ControlForeground}"/>
    </Style>
 
 
<telerik:GridViewDataColumn  Header="Cityname" DataMemberBinding="{Binding Cityname}" FilteringControlStyle="{StaticResource FilteringControlStyle1}"></telerik:GridViewDataColumn>
Tags
GridView
Asked by
Ryan
Top achievements
Rank 1
Share this question
or