Samio

Samio

  • NA
  • 201
  • 176.5k

BindingList Filter on Linq to SQL bindingsource

Aug 1 2012 8:30 PM
Is it possible to Filter a BindingList passed to a bindingsource control:

private void button1_Click(object sender, EventArgs e)
{
  if (textBox1.Text.Length == 0)
  {
     productBindingSource.Filter = null;
  }
  else
  {
     productBindingSource.Filter = "ProductName = '" + textBox1.Text + "'";
     //productBindingSource.RemoveFilter();
  }
}

Thanks in advance.

Answers (1)