Combo Box Binding Freezes on 2nd Item

  • Thread starter Thread starter Mark Phillips
  • Start date Start date
M

Mark Phillips

Hi,

I have bound a combobox to a dataset. With the standard:

this.cboPhoneType.DataSource = dsPhones;
this.cboPhoneType.DisplayMember = "PhoneType.Description";
this.cboPhoneType.ValueMember = "PhoneType.PhoneTypeID";
this.cboPhoneType.DataBindings.Add("SelectedValue",
dsPhones, "PersonPhone.PhoneTypeID");

The bindings move correctly between records. I can add,
update and delete records. Except under 1 condition. If I
select the second item in the list,the application seems
to freeze. In this state I can click other buttons or
text boxes but no focus change seems to occur. If I
change the value in the combo box, the normal actions
resume.

Very strange. Does anyone know the source of this
problem?

Thanks,
Mark
 
I'd like to add that I also programatically inserted a
blank row in the dataset and inserted it at position 1.
The value of the id is 0 and the value of the description
field is " "; This allows the new row to show a blank
value. This has not posed a problem for other comboboxes
in the application.

However, if I remove the blank row. The application
works fine.
 
Back
Top