2009-06-17 23 views
12

Il codice seguente funziona correttamente e filtra correttamente le righe, ma come dovrei ripristinare la tabella allo stato originale?Come posso resettare table.DefaultView.RowFilter?

DataTable table = this.dataGridView1.DataSource as DataTable; 
table.DefaultView.RowFilter = comboBox.Text + " LIKE '%" + strName + "%'"; 

Grazie

risposta

26

provare questo:

table.DefaultView.RowFilter = string.Empty 
+0

lavorano alla grande, grazie. –

+0

Fantastico! grande grazie: D – Tony

-3

questa è la migliore tweak

table.DefaultView.RowFilter = "1 = 1";

+1

No, non è, definitivamente no – Treycos

0

questo funziona anche come un fascino:

table.DefaultView.RowFilter = null /Nothing