views:

185

answers:

0

I created DataGridView in WinForms App. Then at the initializing create DataSet and fill it with some data, bind to DataGridView . I added textBox as a filter. `myBindingSource = new BindingSource();

myBindingSource.DataSource = ds;

myBindingSource.DataMember = dt.TableName;

dataGridView1.DataSource = myBindingSource;` 

   string strCmd = "some filter query";

   myBindingSource.Filter = strCmd;

It works fine with filtering. If I add or delete any row to the DataSet then new data will occur in dridview, BUT filter will not work with new data.

As I found on the forums there is a Table cash, which .NET uses for filter and I want to refresh it. How can I do it?