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

RadGridView ShowSearchPanel control

10 Answers 1175 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tae Hoon
Top achievements
Rank 1
Tae Hoon asked on 31 May 2017, 04:31 AM

Hi, on RadGridView ShowSearchPanel, 

1. How to change the text 'Full Text Search' ?

 

2. and How to delete of disable 'x',close boutton, in ShowSearchPanel?

 

Please give the solution and example Code. 

Thanks.

Martin
Top achievements
Rank 2
Iron
Iron
Iron
commented on 16 Jun 2021, 12:13 PM

it's easier to make your own searchpanel...
https://www.telerik.com/forums/radgridviewcommands-searchbytext

"why can't you just be normal meme applies"

10 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 02 Jun 2017, 11:27 AM
Hello Tae,

I already responded to the support ticket you opened. For completeness, I'm posting the reply here as well.

"How to change the search panel's label has been documented in the following article.

As for hiding the close button, you will need to modify the default control template of the GridViewSearchPanel and remove the CloseButton element.

As per your request, I'm attaching a sample project which implements both requirements.

I hope you find it helpful."

May I kindly ask you to continue the communication in only one of the two threads so that we can keep the conversation history intact? Thank you in advance for your cooperation and understanding.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Muheto
Top achievements
Rank 1
answered on 03 Nov 2017, 10:15 AM

I tried to open  your Project (HideCloseSearchButton) without result. Otherwise i want to remove the X button on my SearchPanel. See the attached file, the x button in black circle. For more infos: the SearchPanel is in RadGridView.

Thank you again for the help.

0
Dilyan Traykov
Telerik team
answered on 06 Nov 2017, 01:14 PM
Hello Muheto,

I'm uploading the project once more. Could you clarify whether you're unable to download it or if you come across any issues whilst running it? If the latter is the case, could you please specify what errors you get in the process?

Nonetheless, here's the modified control template of the GridViewSearchPanel for the Office_Black theme:

<ControlTemplate x:Key="GridViewSearchPanelTemplate" TargetType="telerik:GridViewSearchPanel">
    <Grid UseLayoutRounding="True">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2">
            <Border Background="{TemplateBinding Background}" BorderBrush="{StaticResource GridView_SearchPanelInnerBorder}" BorderThickness="1"/>
        </Border>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBlock
            telerik:LocalizationManager.ResourceKey="GridViewSearchPanelTopText"
            TextWrapping="Wrap"
            Margin="10 0 0 0"
            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
            IsHitTestVisible="False"/>
            <Grid Grid.Column="1" Margin="10 0 10 0" VerticalAlignment="Center">
                <TextBox x:Name="PART_SearchAsYouTypeTextBox"
                Text="{Binding SearchText, Mode=TwoWay}"
                MinWidth="160"
                MaxWidth="200"
                MinHeight="20"
                Padding="3 3 15 3"
                telerik:TextBoxBehavior.UpdateTextOnEnter="True">
                    <TextBox.IsTabStop>
                        <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="IsTabStop"/>
                    </TextBox.IsTabStop>
                </TextBox>
                <telerik:RadButton x:Name="ClearButton"
                IsTabStop="False"
                Visibility="Collapsed"
                Style="{StaticResource ClearSearchValueButtonStyle}"
                Command="searchPanel:GridViewSearchPanelCommands.ClearSearchValue"/>
                <Grid.Triggers>
                    <EventTrigger RoutedEvent="MouseEnter">
                        <BeginStoryboard>
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="MouseLeave">
                        <BeginStoryboard>
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ClearButton" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Grid.Triggers>
            </Grid>
        </Grid>
    </Grid>
</ControlTemplate>
<Style TargetType="telerik:GridViewSearchPanel" BasedOn="{StaticResource GridViewSearchPanelStyle}">
    <Setter Property="Template" Value="{StaticResource GridViewSearchPanelTemplate}"/>
</Style>

Please note that if you're using another theme, you will need to modify its template accordingly.

Do let me know whether you need any further assistance on the matter.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Muheto
Top achievements
Rank 1
answered on 23 Nov 2017, 01:06 PM
Thank u Dilyan Traykov for your advice. it works.
0
hart
Top achievements
Rank 1
Veteran
answered on 11 Aug 2018, 02:38 AM
I vote to have these 2 items added as methods as well
0
Dilyan Traykov
Telerik team
answered on 13 Aug 2018, 02:47 PM
Hello Henry,

What I can suggest is for you to open new feature requests in our feedback portal so that other clients can vote for them as well and we can prioritize them based on their demand.

If you do decide to log such items, please provide detailed specifications of the desired functionality so that we can take everything into account when reviewing them.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Barry
Top achievements
Rank 1
answered on 12 Dec 2018, 06:25 PM
Exception: Cannot find resource named 'GridViewSearchPanelStyle'. Resource names are case sensitive.
????
0
Dilyan Traykov
Telerik team
answered on 13 Dec 2018, 02:40 PM
Hello Barry,

Such an error can occur if you have not merged the required resource dictionaries when using the implicit styles approach for theming the controls. Could you please clarify whether this is the case?

Nonetheless, with the latest internal build (2018.3.1210) we introduced a SearchPanelCloseButtonVisibility property of the RadGridView control which you can now use to control the button's Visibility.

Please let me know whether merging the dictionaries or using the newly-introduced property works for you.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Mauro
Top achievements
Rank 1
answered on 31 Mar 2021, 02:46 PM

Hi, 

for hiding the close button now exists the property SearchPanelCloseButtonVisibility="collapse"

0
Dilyan Traykov
Telerik team
answered on 31 Mar 2021, 03:08 PM

Hi Mauro,

Indeed, with the R3 2018 SP1 release we introduced the SearchPanelCloseButtonVisibility which allows to easily control the visibility of the search panel's close button.

I hope you find it useful.

Regards,
Dilyan Traykov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
Tae Hoon
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Muheto
Top achievements
Rank 1
hart
Top achievements
Rank 1
Veteran
Barry
Top achievements
Rank 1
Mauro
Top achievements
Rank 1
Share this question
or