473,473 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combobox problem

I'm having an issue with a combobox that is making no sense to me at all.

I have a form with several comboboxes/textboxes.
The values in these boxes are based on a datarowview, which is based on a
listbox.selecteditem.

When a different item is selected in the listbox, all the fields are
repopulated with the correct data.

I have 1 combobox which is acting weird.
The combobox values are populated from a table, and can contain a blank
value, or 1 of 3 other values.
The dropdown property is set to dropdown, so users can enter other values
(this is so old data from the database still displays).

When the form is populated, if the value in this combobox is old data (that
isn't in the list), and it is displayed, then when a new record is selected
in the listbox, all fields update and show the correct data, except for this
combobox, it shows the same text.

As a temporary fix, I replaced the combobox with a textbox. I left all the
code that populated it exactly the same, and it works fine...so I'm assuming
it is an issue with the actual combobox, and not with the code that is
populating it...

Where can I start to debug this problem??
TIA!
amber

Apr 4 '06 #1
1 2051
"The dropdown property is set to dropdown, so users can enter other values
(this is so old data from the database still displays)."

Without actually seeing your application I would suspect that allowing this
functionality of keeping old data is the culprit. From what I gather in your
statements you want this old data to remain until the point that you change
your listbox index.

1: You could try a combobox.text = to set it to something other than the old
value. force it to update to what you want even if it isnt in the list. This
should only affect the current value and not the items included.
2: If the items in the combobox are not updating and you would like them to,
try using the combobox.clear function and then use the combobox.items.add
function to individually add the items back in that you need so that you have
a clean update.
3: put a break in your code just before the combobox is updated and step
through one by one and watch the data in the combobox. It may provide you
with a clue as to what is going on.

"amber" wrote:
I'm having an issue with a combobox that is making no sense to me at all.

I have a form with several comboboxes/textboxes.
The values in these boxes are based on a datarowview, which is based on a
listbox.selecteditem.

When a different item is selected in the listbox, all the fields are
repopulated with the correct data.

I have 1 combobox which is acting weird.
The combobox values are populated from a table, and can contain a blank
value, or 1 of 3 other values.
The dropdown property is set to dropdown, so users can enter other values
(this is so old data from the database still displays).

When the form is populated, if the value in this combobox is old data (that
isn't in the list), and it is displayed, then when a new record is selected
in the listbox, all fields update and show the correct data, except for this
combobox, it shows the same text.

As a temporary fix, I replaced the combobox with a textbox. I left all the
code that populated it exactly the same, and it works fine...so I'm assuming
it is an issue with the actual combobox, and not with the code that is
populating it...

Where can I start to debug this problem??
TIA!
amber

Apr 4 '06 #2

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

Similar topics

4
by: Chandra | last post by:
Hello Sir, This is Chandra and Working as Software Engineer. I got a really weird problem with ComboBoxes. I have set the ComboBox DroppedDown Property to true. Now the actual problem is...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
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: anonymous | last post by:
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new...
3
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
0
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first...
4
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
5
by: Peter M. | last post by:
I'm struggling with combobox databinding with something I consider a bug... I'm binding my combobox to an array of structs. The struct exposes two public properties, ID and Name, to be used as...
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.