473,387 Members | 1,882 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,387 software developers and data experts.

Combox Vb.NET

Hi,

Before with comboboxes you could either select something from the lsit or
you could type in a different value (one that is *not* in the list) to use.

I have a combobox of cities and sometimes the city names are not in my
zipcode table.

So I need to be able to type in a city name other than what is in my zipcode
table and be able to save it.

Everytime, I try this with VB.NET Form Control Combobox. When I move to the
next record it will select a value in the lsit to save and save it.
*Discarding* the city name I actually typed.

How do I get the combobox to act the old way. That is allowing a person to
either select from the dropdown list or to type in something different?

Many thanks!
Jul 21 '05 #1
2 1530

"Angela" <An****@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Hi,

Before with comboboxes you could either select something from the lsit or
you could type in a different value (one that is *not* in the list) to
use.

I have a combobox of cities and sometimes the city names are not in my
zipcode table.

So I need to be able to type in a city name other than what is in my
zipcode
table and be able to save it.

Everytime, I try this with VB.NET Form Control Combobox. When I move to
the
next record it will select a value in the lsit to save and save it.
*Discarding* the city name I actually typed.

How do I get the combobox to act the old way. That is allowing a person
to
either select from the dropdown list or to type in something different?

Many thanks!


Are you trying to save the new city name in the combo box's items collection
or somewhere else?
Have you tried saving what was typed (the Text property) and either putting
it into the combo box's Items collection or saving it in a variable using,
as a possible candidate, the LostFocus event procedure?

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Jul 21 '05 #2
Hi Peter,

Thanks for replying... I figured out what I did wrong...

I had binded to a dataset and when doing so I binded the .SelectText value
for the saving value.

Inorder to get it to work I binded the .Text value of the combobox to the
dataset and it fixed my problem... Atleast I think... I haven't fully tested
it yet...

Many Thanks,

Angela

"Peter van der Goes" wrote:

"Angela" <An****@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Hi,

Before with comboboxes you could either select something from the lsit or
you could type in a different value (one that is *not* in the list) to
use.

I have a combobox of cities and sometimes the city names are not in my
zipcode table.

So I need to be able to type in a city name other than what is in my
zipcode
table and be able to save it.

Everytime, I try this with VB.NET Form Control Combobox. When I move to
the
next record it will select a value in the lsit to save and save it.
*Discarding* the city name I actually typed.

How do I get the combobox to act the old way. That is allowing a person
to
either select from the dropdown list or to type in something different?

Many thanks!


Are you trying to save the new city name in the combo box's items collection
or somewhere else?
Have you tried saving what was typed (the Text property) and either putting
it into the combo box's Items collection or saving it in a variable using,
as a possible candidate, the LostFocus event procedure?

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.

Jul 21 '05 #3

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

Similar topics

1
by: VIJAY KUMAR | last post by:
Hi all, I have a problem with combobox. I have 2 comboxes cmbcategory and cmbsubcategory. I intialized cmbcategory with sum values from database on Form_Load. when i select a vlue from the...
0
by: raj | last post by:
Please Help with the combox DisplayValue property private void cboClient_SelectionChangeCommitted(object sender, System.EventArgs e) { String strSQL; strSQL = "SELECT F.FollowUpPerson FROM...
4
by: Charles A. Lackman | last post by:
Hello, I have a combox that I am trying to get to work in the following fashion. As you type in the combox that the item that matches what you are type is selected. as you type a last name:...
3
by: Alpha | last post by:
This is a Window based application. How do I get my combox listing to display in sorted order by DataMember? I inserted a blank row to the dataset table which is the datasrouce for the comboBox...
2
by: Alpha | last post by:
I have a window application. On one of the form, there is a listbox and a few combox. The lstSchItem has a dataview as a datasource. The comboxes are bind to its selected value but through the...
2
by: Bob | last post by:
The scenario is that of the employees table wherein there's an EmployeeId and a ReportsTo field in the same table. The combobox is one in a datagrid view that lets you select an employee from the...
1
by: neo1ra | last post by:
Hi, I'm doing a search combox to pop up and specific record. Everything is working fine until I make a change to the record that I'm working on and try to move to other record. A error message...
2
by: summiyashaheen | last post by:
how to read the valuemember of the combox whose data source is a detaset. i have assigned the properties of displaymember and valuemember . display member cis visible but i cant get the value member...
2
by: haringmunti | last post by:
hi, im new to vb.net and i think it is very interesting. im taking a course on it right now and sadly, the one giving the lecture is not doing a good job. anyway, my question is how do i make a...
1
by: dewgan | last post by:
I have a form with a combox box where the list is populated via a linked table. This works fine. I have a text box that is filled with the name selected in the combox box. That name is then added...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.