3 Answers, 1 is accepted
Hello, Mark,
The MasterView.TableSearchRow offers the SearchProgressChanged event which is fired while the search operation is ongoing and it allows you to get the results in portions as they are discovered: https://docs.telerik.com/devtools/winforms/controls/gridview/rows/search-rowHowever, if you want to detect the textbox text changes, please have a look at the following code snippet:
public RadForm1()
{
InitializeComponent();
this.radGridView1.AllowSearchRow = true;
this.radGridView1.ViewCellFormatting += radGridView1_ViewCellFormatting;
}
private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
GridSearchCellElement searchCell = e.CellElement as GridSearchCellElement;
if (searchCell != null)
{
searchCell.SearchTextBox.TextChanged -= SearchTextBox_TextChanged;
searchCell.SearchTextBox.TextChanged += SearchTextBox_TextChanged;
}
}
private void SearchTextBox_TextChanged(object sender, EventArgs e)
{
GridSearchCellTextBoxElement tb = sender as GridSearchCellTextBoxElement;
Console.WriteLine(tb.Text);
}
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
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.
Thank you very much. But I found a better fix for our needs, we just turned set the "AutomaticallySelectFirstResult" to false, which solved our problem.
Thank You
Hi, Mark,
I am glad that you have found a suitable solution for your case.
Indeed, the AutomaticallySelectFirstResult property determines if the first result found by the search mechanism will be selected and brought into view. If you don't want this behavior, feel free to set the property to false.
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
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.