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

valuemember and displaymember for a combobox

Sam
This code does not work :

With m_frmCtrl.cboMode
.DataSource = m_dsCtrl.Tables(4)
.ValueMember = "ModeID"
.DisplayMember = "Description"
.SelectedValue = ds.Tables(0).Rows(curRow).Item("ModeID")
End With

The line .DisplayMember triggers the following error :

Could not bind to the new display member.

If I invert those two lines :

.DisplayMember = "Description"
.ValueMember = "ModeID"
I got this error :

Could not bind to the new value member.

I've checked m_dsCtrl.Tables(4) and it contains everything right.

This is driving me crazy, can someone help please ?

Nov 21 '05 #1
2 6422
Sam,

Mostly is this an upercase lowercase error.
This is in windowsform case sensitive.

Cor
Nov 21 '05 #2
Sam
yes exactely. I had found it actually... ModeID should be ModeId :)

Thanks anyway.

Nov 21 '05 #3

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

Similar topics

3
by: cody | last post by:
I do not think it is good style to use these because you have to hardcode the propertynamed in your code as string literals. Wouldn't it be better to use delegates instead? ...
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...
1
by: gudia | last post by:
Two tables: Accounts and Companies Accounts (AcctID, AcctNmbr, AcctName, CompID) -- AcctID is PK and CompID is Foreign Key from Companies. Companies (CompID, CompName) -- CompID is PK. ...
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 =...
4
by: al | last post by:
Greetings, As I understands it, SelectedValud of combobox reads its value from ValueMember property of the combobox. This doesn't work with me. What happens is just randome update. This is the...
1
by: Phill. W | last post by:
Am I missing something here? I have a simple class that exposes String properties called "Key" and "Description". I have a Control inherited from a ComboBox, into whose Items collection I've...
1
by: Bruce A. Julseth | last post by:
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: ...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.