troubleshooting Question

How do i get a field from a combo box

Avatar of Olukayode Oluwole
Olukayode OluwoleFlag for Canada asked on
3 Comments1 Solution146 ViewsLast Modified:
I have a c# application in which i need to get a field from a combo box.

See a table which i have loaded into a combo . (See table below)

Loaded Table with Data
What i want to grab are 2 fields  othercurrencycode   and  exchrate

Below is the script that does the Load and specifies the 2 fields  to get

  LoginDetails.exDataSource = GlobalConfig.Connection.GetExchRate_All();
  glTRANSCurrencyValue.DataSource = LoginDetails.exDataSource;
  glTRANSCurrencyValue.DisplayMember = "FullCodeName";
  glTRANSExchrateValue.DataBindings.Add(new System.Windows.Forms.Binding("Text", LoginDetails.exDataSource, "exchrate", true));
  glTRANSCurrencyValue.DataBindings.Add(new System.Windows.Forms.Binding("Text", LoginDetails.exDataSource, "othercurrencycode", true));

Below is short of the screen that shows the loaded Combo

Combo Load Display
The screen below shows that the Currency instaed is showing the ValueMember is showing the DisplayValue (see below)

Currecycode value showing display member instead of Valuemember
what do i need to specify to get the USD  as the code at runtime and not the complete record


Rikin Shah
Microsoft Dynamics CRM Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros