質問

以下のコードは正常に機能し、行を正しくフィルタリングしますが、テーブルを元の状態に復元するにはどうすればよいですか

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&quot ;;

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top