473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

New Value in Combo-box

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#.
Jul 21 '05 #1
2 3857
On Sun, 5 Oct 2003 10:11:11 -0700, "Ted" <te**@keyway.net> wrote:
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.

Jul 21 '05 #2
Ted
Jekke,
If the values in the pull-down list are from a linked
table does this solution still work?

Thank you for your help.
-----Original Message-----
On Sun, 5 Oct 2003 10:11:11 -0700, "Ted" <te**@keyway.net> wrote:
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 usercould 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 Ithink you're asking how to add a new element to a combo box when youleave 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 collectionlooking to see if the text entered matches anything already in thebox.

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 andclarify.

.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: ZZZ | last post by:
I have several combo's with databinding values. when a user starts typen, it's autocompleting so far so good but i don't want the user to have the ability to type a values that's not in the...
1
by: Adjo | last post by:
Okay, I've seen all the examples of using comboboxes on webforms when using simple values. And in the issue-tracker starterkit there is a way to use comboboxes with id/value foreign keys in a smart...
4
by: deko | last post by:
Basic question about checking the value of Toggle/Check/Combo/OptionGroups.... Checking like this: If Me!chkCheckBox Then ... End If and like this:
3
by: BrianDH | last post by:
Hi Is there a way to have the view/display width different from the width as it sits on the form? Thanks Brian
7
by: Harris | last post by:
Dear all, I have the following codes: ====== public enum Enum_Value { Value0 = 0, Value1 = 10,
1
by: sumanthdivvela | last post by:
<select name="cityName" class="CLiKSformfield" id="IdfbCity" onChange="javascript:addCity(this);"> <option value="ALL">Select Location</option> <option value="1001" >...
4
benchpolo
by: benchpolo | last post by:
I have a dropdown combo "TaxYear" with 2 fields Autonumber, Year. When data are entered in form the value that displays in the dropdown combo are Year, but when i assign the me.year.value to a...
9
by: anthony | last post by:
In Access 2007, why does a query field designed as Term: ! ! return 00:00:00 when cboTerm actually contains 08SP. This works as expected in Access 2003?
1
by: vgarzon | last post by:
Hi, I'm having issues setting a multi-column combobox in the right way. What I'm trying to do is that when I click on a table (access 2007 subform), a form should fill with the values of the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.