Good morning
I am using the SHOWSEARCHPANEL properties datagridview component and I would need to tie me to the click event of the search textbox.
Can you help me?
Thank you
2 Answers, 1 is accepted
0
Stefan Nenchev
Telerik team
answered on 20 Jul 2016, 01:32 PM
Hello ,
Generally, if you have the ShowSearchPanel set to true before loading the RadGridView, the TextBox would be the first one that is contained within the RadGridView. With this in mind, in the Loaded event of RadGridView, you can subscribe to the Click event of this TextBox through the following approach:
You can also find the TextBox through its Name property. The name of the TextBox within the SearchPanel is "PART_SearchAsYouTypeTextBox":
var textBox = this.clubsGrid.ChildrenOfType<TextBox>().Where(x => x.Name == "PART_SearchAsYouTypeTextBox").FirstOrDefault();
In case you are showing the SearchPanel when the RadGridView is already loaded, you can use the SearchPanelVisibilityChanged event of RadGridView.
Please update me whether the information provided was sufficient for your requirement. Of course, if you have any further questions or concerns, do not hesitate to contact us.
Regards,
Stefan Nenchev
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.