New Value in Combo-box

  • Thread starter Thread starter Ted
  • Start date Start date
T

Ted

How do I allow a user to enter a new value into a combo
box for web-based (.Net) application?

The orgiginal platform was a networked solution. The user
could enter a new value if they didn't find what they
were looking for in the pull-down list. The new value
would be entered only into the current record.

The new platform is being developed with ASP.Net,
VisualBasic.Net and C#.
 
How do I allow a user to enter a new value into a combo
box for web-based (.Net) application?

The orgiginal platform was a networked solution. The user
could enter a new value if they didn't find what they
were looking for in the pull-down list. The new value
would be entered only into the current record.

There are many possible questions you might be asking for here, but I
think you're asking how to add a new element to a combo box when you
leave the box.

I was able to accomplish this by doing the following:

1. Leave the default properties on the combo box when you create it.
(Changing name is, of course, fine.)

2. Set the combo box text to String.Empty on its _Enter event.

3. On the combo box's leave event, loop through its .Items collection
looking to see if the text entered matches anything already in the
box.

4. If the string is new, call myComboBox.Items.Add(myComboBox.Text)

If this isn't what you're asking, you might want to ask again and
clarify.
 
Back
Top