473,385 Members | 2,005 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,385 software developers and data experts.

comboBox irregular behavior??

Hi

I'm using MS Visual C#.NET

Microsoft Development Environment 2002 Version 7.0.9955 (spanish edition)
Microsoft .NET Framework 1.0 Versión 1.0.3705 (spanish edition)
(Microsoft Visual C# .NET 55609-652-0000007-18500)

I'm working on a simple database project and building a Windows Form App. In
the app there is a comboBox component (named provincias_comboBox) which is
dataBinded to a table in a database.

In the process of finding a particular record, by a given criteria, all the
components corresponding to table fields, shown in the form are updated,
including the provincias_comboBox 's Text property. And it indeed changes in
the form view.

Code:
string tempProvincia;
tempProvincia = (string) dataTable.Rows[ 0 ][ 3 ]; // This
temporary table field contains the value to be assigned

provincia_comboBox.Text = tempProvincia;
MessageBox.Show(tempProvincia + "\n\n" + provincia_comboBox.Text);

But when I try to get the Text property value as in the last code line
above, the property contains the old value. Thus, the resulting dialog
message box show two differet strings: the updated value (the same shown now
in the visual comboBox component) and another: the yet unchanged old value
for the Text property of the provincia_comboBox component
(provincia_comboBox.Text ).

I wonder why this is happening.

I'll appreciate any help.

Eric
Nov 17 '05 #1
0 920

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

Similar topics

0
by: jean | last post by:
hi: i am developing a custom combobox for my company's needs that is made up of a textbox, listbox, button. i am using c#. everything is fine except for one issue. in a normal combobox,...
5
by: hasden | last post by:
I'm working in .NET and I can't seem to get the behavior that I need from the combobox. I'm sure it's possible, I just don't have the .NET experience. Any help would be greatly appreciated. I need...
5
by: Steve | last post by:
I have an unbound combobox in the form header of a continuous form. The selection in the combobox sets the where clause in a querydef which determines QryPFrmInventoryManagement. The following code...
0
by: CalPARK InterNetStation | last post by:
Could anyone explain why the difference of behavior betweein Case1 and Case2 occurs? Microsoft Visual C#.NET 55607-652-0000007-18218 Windows Forms Application 1. put a TabControl on a Form...
1
by: Eric Lin | last post by:
Hi I'm using MS Visual C#.NET Microsoft Development Environment 2002 Version 7.0.9955 (spanish edition) Microsoft .NET Framework 1.0 Versión 1.0.3705 (spanish edition) (Microsoft Visual C#...
9
by: Strahimir Antoljak | last post by:
Could anyone help me with the following: Is there a quick, or at least known way to force a ComboBox, having DropDownStyle= DropDownList, to recognize keyboard input and perform Item selection...
4
by: Strahimir Antoljak | last post by:
Has anyone experienced problems with a combo box SelectIndex property? Is there a limit to the number of Items for a combo box? Namely, when I set programmatically ComboBox.SelectIndex...
0
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...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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,...

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.