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

Newbe ValueMember property question

Sorry. The other post got sent before I was complete.

Does the ValueMember property in the ComboBox work like the DisplayMember
property. For example, if I set the properties:

comboBox1.DataSource = dataSet1
comboBox1.DisplayMember ="Employees.LastName"
comboBox1.ValueMember = "Employees.EmployeeID"

If I select from the box a "LastName", I can retrive that selected name. How
do I retrieve the "ValueMember" setting, ie the "EmployeeID" for the
selected "LastName."

Or, isn't that the way ValueMember works? Is so, how does it work and how is
it used. I'm looking for a replacement for the VB.Compatibility
"VB6.GetItemData."

Thank you..

Bruce
Nov 21 '05 #1
1 1552

"Bruce A. Julseth" <br***********@attglobal.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Sorry. The other post got sent before I was complete.

Does the ValueMember property in the ComboBox work like the DisplayMember
property. For example, if I set the properties:

comboBox1.DataSource = dataSet1
comboBox1.DisplayMember ="Employees.LastName"
comboBox1.ValueMember = "Employees.EmployeeID"

If I select from the box a "LastName", I can retrive that selected name. How do I retrieve the "ValueMember" setting, ie the "EmployeeID" for the
selected "LastName."

Or, isn't that the way ValueMember works? Is so, how does it work and how is it used. I'm looking for a replacement for the VB.Compatibility
"VB6.GetItemData."

Thank you..

Bruce


Never mind. I found the answer.. selectedValue property

Thanks..

Bruce
Nov 21 '05 #2

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

Similar topics

1
by: Jim Heavey | last post by:
If you have a comboBox which has it's DisplayMember and ValueMenber bound to a datatable. If I know the "ValueMember" value - is there a way for me to set the index of the control to correspond...
0
by: Beringer | last post by:
I have implemented a combobox and have set the DataSource to an ArrayList. I next set the DisplayMember and ValueMember properties. When I run the code the combobox will display the proper text...
1
by: Bruce A. Julseth | last post by:
Does the ValueMember property in the ComboBox work like the DisplayMember property. For example, if I set the properties: comboBox1.DataSource = dataSet1;comboBox1.DisplayMember =...
3
by: Tony Maresca | last post by:
I am binding a combo box to an ArrayList of objects with a property called "Name" that is assigned to DisplayMember. How can I have the SelectedValue of the combo return the instance of the...
12
by: Wes McCaslin | last post by:
I have a question about concrete and abstract classes. what are the differances? can you explain them to me. I have started an advance Visual Studio.Net class and I am having a hard time...
1
by: Jim | last post by:
I have created a windows form that contains several tab pages which contain a panels. On a tab page I am trying to dynamically create a series of buttons in that pages panel. I am failing because...
1
by: geraldine hobley | last post by:
Hello, I wish to set the valuemember of a combobox to the value of a property in a class(projlist - see below). I wish to set the valuember of the combobox cmbstatus to the value of property...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
5
by: Spam Catcher | last post by:
Hello all, I can't seem to set the value member properly in code... I'm using a ComboBox in DropDownList mode: Private Class ApplicationsComboBoxItem Private _Name As String Private...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.