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

Hide Match Case Button

5 Answers 108 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Richard Harrigan
Top achievements
Rank 1
Richard Harrigan asked on 04 Jul 2011, 07:53 PM
Hi,

Can you tell me how to hide the Match Case Button?

Thanks
Rich

5 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 04 Jul 2011, 08:37 PM
Hi Richard,

 

A possible approach in your case is to alter the appearance of StringFilterEditor control and remove the MatchCase button from there. An implict style targeted at StringFilterEditor will be handled correspondingly by RadGridView's FilteringControl. 


Regards,
Vanya Pavlova
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
Richard Harrigan
Top achievements
Rank 1
answered on 05 Jul 2011, 01:54 PM
Hi,

In my case I am not using RadGridView, I am using RadDataFilter stand-alone where I create the definitions (see code below).  In this situation can you show the code to hide the case button.  I use this to create a where clause that I send to the server and since I  not providing case capability I would like to hide the button.

Thanks
Rich
foreach (QueryColumnProperties colProp in queryTableProperties.QueryColumnProperties)
            {
                ItemPropertyDefinition itemDef = new ItemPropertyDefinition();
                itemDef.DisplayName = colProp.ColumnName;
                itemDef.PropertyType = Type.GetType(colProp.MetaColumn.SystemDataType);
                itemDef.PropertyName = colProp.ColumnName;
                radDataFilter.ItemPropertyDefinitions.Add(itemDef);
            }

0
Vanya Pavlova
Telerik team
answered on 09 Jul 2011, 10:10 AM
Hi Richard,

 

In this case you may predefine the appearance of RadDataFilter control and remove the match case button from there, however I am not quite sure how this works for you. You may refer to our online documentation where you may find detailed information about RadDataFilter's styling, follow this link.



Best wishes,
Vanya Pavlova
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Pete
Top achievements
Rank 1
answered on 04 May 2012, 09:10 AM
I got rid of the Match Case button by opening Telerik.Windows.Controls.dll in notepad and searching for "StringFilterEditor" to get the XAML for the control. I commented out the RadToggleButton and added the ResourceDictionary  in my Appl.xaml

<ResourceDictionary
    xmlns:filteringEditors="clr-namespace:Telerik.Windows.Controls.Filtering.Editors;assembly=Telerik.Windows.Controls"
    >
    <ControlTemplate x:Key="StringFilterEditorTemplate" TargetType="filteringEditors:StringFilterEditor">
        <Grid MinWidth="100">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0"
                     Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                     telerik:StyleManager.Theme="{StaticResource Theme}"
                     VerticalAlignment="Stretch"
                     telerik:TextBoxBehavior.UpdateTextOnEnter="True"
                     telerik:TextBoxBehavior.SelectAllOnGotFocus="True"/>
<!-- 
            <telerik:RadToggleButton Grid.Column="1" Margin="2,0,0,0"
                                     IsChecked="{Binding IsCaseSensitive, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                     Visibility="{Binding MatchCaseVisibility, RelativeSource={RelativeSource TemplatedParent}}"
                                     telerik:StyleManager.Theme="{StaticResource Theme}"
                                     Content="aA">
                <ToolTipService.ToolTip>
                    <TextBlock telerik:LocalizationManager.ResourceKey="GridViewFilterMatchCase" />
                </ToolTipService.ToolTip>
            </telerik:RadToggleButton>-->
        </Grid>
    </ControlTemplate>
    <Style x:Key="StringFilterEditorStyle" TargetType="filteringEditors:StringFilterEditor">
        <Setter Property="Template" Value="{StaticResource StringFilterEditorTemplate}" />
        <Setter Property="IsTabStop" Value="False" />
 
    </Style>
    <Style  TargetType="filteringEditors:StringFilterEditor" BasedOn="{StaticResource StringFilterEditorStyle}"/>
</ResourceDictionary>

0
Steve
Top achievements
Rank 1
answered on 01 Jun 2016, 05:03 PM

        private void OnRadDataFilterEditorCreated(object sender, EditorCreatedEventArgs e)
        {
            var radDataFilter = (RadDataFilter)sender;

            if (e.Editor is StringFilterEditor)
            {
                
                var editor = e.Editor as StringFilterEditor;
                editor.MatchCaseVisibility = Visibility.Collapsed;
            }

}

private void OnRadDataFilterEditorCreated(object sender, EditorCreatedEventArgs e)
{
    if (e.Editor is StringFilterEditor)
    {
        var editor = e.Editor as StringFilterEditor;
        editor.MatchCaseVisibility = Visibility.Collapsed;
 
    }
}


Tags
DataFilter
Asked by
Richard Harrigan
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Richard Harrigan
Top achievements
Rank 1
Pete
Top achievements
Rank 1
Steve
Top achievements
Rank 1
Share this question
or