Hi all,
I'm working on a winforms project and I have a combobox implemented inside a menu strip on the MDI parent form. I'm trying to bind that combobox to a data table (LINQTOSQL) and filter it.
My code is the following :
BindingSource bs = new BindingSource();
bs.DataSource = dataContext.UserRoleInProjects;
bs.Filter = "userID = '" + CurrentUser.userID.ToString() + "'";
amendmentsComboBox.ComboBox.BindingContext = this.BindingContext;
amendmentsComboBox.ComboBox.DataSource = bs;
amendmentsComboBox.ComboBox.DisplayMember = "Project";
amendmentsComboBox.ComboBox.ValueMember = "projectID";
The table is updated inside a MDI child form, but nothing seems to happen.. What might I be doing wrong?