Allow a user to create a new item in a ComboBox



I've been trying to decide the best way to allow a user to enter a new item
into a ComboBox. For example, I have a lookup table that I have bound to a
ComboBox. If a user wants to add a new category, I would like them to be
able to do that without clicking a button or working with another dialog. I
tried doing away with bindign my table to the control and instead adding the
items manually so that I could add a "<Add new item>" item at the end, but
then I realized I'm not sure of a clean way handle the event where a user
actually types a value in.

What I would like to do is when I detect (somehow) that they have types a
custom category, make a quick trip to the DB and store it, then get the ID
of that category so they can keep on working. How to detect when an item is

This must be something that some of you do, what are the tricks?

Thanks for any help,
Steve K.




Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question