When I type text in the search box, several non-matching rows are selected. The number that shows to the right in the search box, but the actual number of rows selected is wrong. I am using the following event code to get the selected rows. I am writing the number of rows selected to the console. I have attached a screenshot of the issues.
private void TableSearchRow_SearchProgressChanged(object sender, SearchProgressChangedEventArgs e)
{
GridViewSearchRowInfo searchRow = sender as GridViewSearchRowInfo;
if (e.SearchFinished && searchRow.CurrentSearchResultsCount > 0)
{
foreach (GridSearchResultCellInfo cellInfo in e.Cells)
{
cellInfo.RowInfo.IsSelected = true;
}
}
Console.WriteLine(dgvFiles.SelectedRows.Count().ToString());
}