I have a combo box bound to a Data Source (clientInfoBindingSource) for its selected item and text, I am using a auto generated Binding Navigator on a different Data Source (totalsBindingSource) and on
this.totalsBindingSource.CurrentChanged += new System.EventHandler(this.updateClientInfo);
it should update the current object for client info binding source.
private void updateClientInfo(object sender, EventArgs e)
{
clientInfoBindingSource.Position = clientInfoBindingSource.Find("ClientID",ClientIDTextBox.Text);
}
On the last item in the list it is updating all of my text boxes correctly but the drop down software box will be blank.
Here is the autogenerated code for the combobox
//
// softwareComboBox
//
this.softwareComboBox.DataBindings.Add(new System.Windows.Forms.Binding("SelectedItem", this.clientInfoBindingSource, "Software", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.softwareComboBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.clientInfoBindingSource, "Software", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.softwareComboBox.FormattingEnabled = true;
this.softwareComboBox.Location = new System.Drawing.Point(106, 234);
this.softwareComboBox.Name = "softwareComboBox";
this.softwareComboBox.Size = new System.Drawing.Size(220, 21);
this.softwareComboBox.TabIndex = 23;
Any pointers in the right direction. This datasource is bound to a Dataset which was auto-genrated from a SQL server.
To fill the drop down on load of the main form i do
this.clientSoftwareTableAdapter.Fill(this.clientsDataSet.ClientSoftware);
softwareComboBox.Items.AddRange(this.clientscDataSet.ClientSoftware.Select(a => a.Software).ToArray());
EDIT -- Changed the above code to use DataSourceUpdateMode.OnPropertyChanged but it did not affect the behavior.