如何重置table.DefaultView.RowFilter?
-
06-07-2019 - |
题
下面的代码工作正常并正确过滤行但是如何将表恢复到原始状态?
DataTable table = this.dataGridView1.DataSource as DataTable;
table.DefaultView.RowFilter = comboBox.Text + " LIKE '%" + strName + "%'";
由于
解决方案
试试这个:
table.DefaultView.RowFilter = string.Empty
其他提示
这也很有魅力:
table.DefaultView.RowFilter = null /Nothing
这是最好的调整
table.DefaultView.RowFilter =" 1 = 1";
不隶属于 StackOverflow