문제

아래 코드는 잘 작동하고 행을 올바르게 필터링하지만 테이블을 원래 상태로 어떻게 복원합니까?

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";

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top