1.设置过滤条件
gdv_pro.ActiveFilterString = $"Contains([查询列], ‘查询值‘)"; //
2. 过滤结果中再逐行处理
在CustomRowFilter事件中:此事件可以看做对逐行进行处理
//下例表示将不符合过滤条件的行也显示在结果中
ColumnView view = sender as ColumnView;
            string country = view.GetListSourceRowCellValue(e.ListSourceRow, "Country").ToString(); //e.ListSourceRow当前行的行号,会自动递增,Country列名,语句返回当前行Country列的值。
            // Check whether the current row contains "ca" in the "Country" field.
            if (country == "ca")
            {
                // Make the current row visible.
                e.Visible = true; //使匹配行始终显示
                // Prevent default processing, so the row will be visible 
                // regardless of the view‘s filter.
                e.Handled = true;
            }
原文:https://www.cnblogs.com/mol1995/p/14509455.html