Using .Net framework 1.1
I've got a Windows Forms application with a tab control having four tab pages. TabPage4 contains a Combobox and a TextBox, which are bound to the same XML file as a DataSource. The ComboBox displays the values from the "name" column of the DataSource and the TextBox displays the "location" value. The two controls are co-ordinated by a BindingManagerBase (bmInfo). When a different "name" item in the ComboBox is selected, the TextBox displays the associated "location" value:
private void comboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
bmInfo.Position = comboBox.SelectedIndex;
}
The DataSource, Databindings and BindingManagerBase are initialized in the constructor for Form1.
So far, so good. However, when I switch to another tab page and then back to TabPage4, the displayed values of the ComboBox and TextBox have changed to the first row of values in the DataSource (Index 0). Why? and how do I prevent this from happening? I've tried setting the "Causes Validation" properties of the TabControl and TabPage to "false" to no avail.
--
Take care,
Ken
(to reply directly, remove the cool car. <sigh>)