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

ComboBox + Assigning Variable

Hi all,



How do I assign a variables values to a comboBox?

Using visual studio 2005 and C#.



Below MessageBox displays correct values but they not shown in the combobox.



Expand|Select|Wrap|Line Numbers
  1.  
  2. foreach (XmlNode Result in ResultsArray) // Loop Array
  3. {
  4.    string fundID = Result.InnerText.Trim();
  5.    fundComboBox.ValueMember = fundID;
  6.    fundComboBox.DisplayMember = fundID;
  7.    MessageBox.Show("test: "+fundComboBox.DisplayMember);
  8. }
  9.  
  10.  
May 10 '07 #1
1 1484
Vidhura
99
fundComboBox.Items.Add(fundID);
May 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: dimension | last post by:
Hi, i have one question and one opinion i seek. please assist if you can. I am using VS2005 beta. 1) I have two tables with the following columns Security: security_id, name, symbol, exchange_id...
2
by: Susan Bricker | last post by:
Greetings. I have a form (frmDogs) that is invisible while a subsequent form (frmPeople) is visible. The visible form sets a value for a combobox (cboOwner) in the hidden form, makes the...
3
by: Don | last post by:
My user control has a combobox with an arraylist attached to it along with custom add and remove methods. The "Add" method is working great. However I don't understand why the "Remove" method...
3
by: Tim Ford | last post by:
People, I trying to write a lookup combobox that gets it's data via a sql table. I can populate the combobox with the information and have handled all the filtering, how ever i can't seem to...
2
by: Rayne | last post by:
I have a combobox that is bound to a datasource. It lists the users in the system and I want it to automatically select the current logged on user, so that the screen loads that user's information...
5
by: Joe | last post by:
Hi I am adding a class to a ComboBox - and all is fine except that I fill the combobox on the Form_Load Method and it causes the method private void comboBox2_SelectedIndexChanged(object...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
4
by: hhak | last post by:
Hi all, Im pretty new to C#, im trying to assign a combobox selected value to a int variable. int number; combobox has items added (1,2,3,4,...9) when i select a number from the combobox i...
3
by: Marc Gravell | last post by:
Sure; just set the DataSource, DisplayMember and ValueMember of a DataGridViewComboBoxColumn (below ). Marc using System.Collections.Generic; using System.Windows.Forms; using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
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.