Skip to content

Putting it out there…


Tag: ComboBox

The problem

I thought it would be usefull if there was a “Selection Changing” event on a ComboBox.

For Example: I have a ComboBox filled with Customers. Linked with the ComboBox is a UserControl which contains detailed information for the selected customer. On the UserControl I have validation methods. I wish that they are executed when the user wants to change the selected customer.

With a “Selection changing” event, I would still be able to cancel the new selection and still have access to the current SelectedItem.

continue reading…

A silly problem

After three years of programming WinForms, it’s the first time I’ve encountered this error.

It’s a pretty vague error “Too many items in the combo box.”, without an inner exception. Even weirder, my ComboBox was empty when I used the Add method to insert a custom DTO object. So I went into debug mode and after a couple of minutes, a bell rinkled.

continue reading…