How can i bind my GridViewSearchPanel to my RadGridView?

1 Answer 69 Views
GridView
Dominik
Top achievements
Rank 1
Iron
Iron
Dominik asked on 22 Nov 2023, 12:13 PM

Hey i dont want to use the integrated version of the Searchpanel because my design has it a different possition than direktly above it.

So i want to use  <telerik:GridViewSearchPanel   /> but i dont know how to bind it to the RadGridView.

Thanks

Dominik

 


1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 24 Nov 2023, 09:36 AM

Hello Dominik,

The GridViewSearchPanel is not designed to work as a stand-alone control. It should be part of the ControlTemplate of RadGridView and its x:Name in the template should be "PART_SearchPanel" in order to work as expected.

Instead of using the GridViewSearchPanel, I suggest you to implement custom visualization. You can use the SearchByText command in order to execute the search action manually.

string searchText = "search text";
var searchCommand = (RoutedUICommand) RadGridViewCommands.SearchByText;
searchCommand.Execute(searchText, this.gridView);

Regards,
Martin Ivanov
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
Dominik
Top achievements
Rank 1
Iron
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or