Hide Match Case Button

6 posts, 0 answers
  1. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 04 Jul 2011 Link to this post

    Hi,

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

    Thanks
    Rich
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 04 Jul 2011 Link to this post

    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
  3. DevCraft banner
  4. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 05 Jul 2011 Link to this post

    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);
                }

  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Jul 2011 Link to this post

    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!

  6. Pete
    Pete avatar
    67 posts
    Member since:
    Sep 2012

    Posted 04 May 2012 Link to this post

    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>

  7. Steve
    Steve avatar
    1 posts
    Member since:
    Jun 2016

    Posted 01 Jun in reply to Pete Link to this post

            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;
     
        }
    }


Back to Top
DevCraft banner