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.
BindingList Filter on Linq to SQL bindingsource
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Samio170 reputationPosted Aug 1, 2012, 5:50 PM EDT
After implementing the BindingList in the project, the next code can be used inside Button click event:
var qry = (from p in dc.Products
select p).ToList();
BindingList
IEnumerable
BindingSource1.DataSource = sel;