if (this.lstIndividualDelay.DataSource == null) { MessageBox.Show("null"); } else { MessageBox.Show("not null"); this.txtIncludeDelay.Text = this.oIndividualDelayCollection[this.lstIndividualDelay.SelectedIndex].IncludeDelay.ToString(); this.txtIncludeFile.Text = this.oIndividualDelayCollection[this.lstIndividualDelay.SelectedIndex].IncludeFile.ToString(); }to the listbox.SelectedIndexChanged. Apparently the event fires when I set the DataSource to null, and that screws things up without notifying me that things are screwed up. Checking if datasource is null or not before changing the textbox.text property based on the selected index makes a lot of sense.