Hello,
I have a problem with a column filter. Please see the following code:
The grid is bound to the BindingSource. The binding source is bound to a list. Initially a list contains 5 records. When I click the column filter, I see all 5 values there. Then I assign another list (with 3 records only) to the BindingSource's DataSource. The grid presents 3 rows. But when I click the column filter, it shows the previous 5 ones (please see the attached image).
This issue occurs in v.2011.1.11.315 and v.2011.1.11.427.
How should I "refresh" the filter in order to see the actual values only?
Thank you.
I have a problem with a column filter. Please see the following code:
using System; using System.Collections.Generic; using System.Windows.Forms; namespace GridTest1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); List<Data> list = new List<Data>(); list.Add(new Data() { Value = "A" }); list.Add(new Data() { Value = "B" }); list.Add(new Data() { Value = "C" }); bindingSource1.DataSource = list; } private void btnChangeData_Click(object sender, EventArgs e) { List<Data> list = new List<Data>(); list.Add(new Data() { Value = "A" }); bindingSource1.DataSource = list; } } public class Data { public string Value { get; set; } } } The grid is bound to the BindingSource. The binding source is bound to a list. Initially a list contains 5 records. When I click the column filter, I see all 5 values there. Then I assign another list (with 3 records only) to the BindingSource's DataSource. The grid presents 3 rows. But when I click the column filter, it shows the previous 5 ones (please see the attached image).
This issue occurs in v.2011.1.11.315 and v.2011.1.11.427.
How should I "refresh" the filter in order to see the actual values only?
Thank you.