21

The code below works fine and filters the rows correctly but how would I restore the table to its original state?

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

Thanks

Kay Lee
  • 922
  • 1
  • 12
  • 40

2 Answers2

39

try this:

table.DefaultView.RowFilter = string.Empty
Muad'Dib
  • 28,542
  • 5
  • 55
  • 68
3

This works also like a charm:

table.DefaultView.RowFilter = null /Nothing
Petter Friberg
  • 21,252
  • 9
  • 60
  • 109