Advertisement

02.05.2008 at 03:35AM PST, ID: 23137681
[x]
Attachment Details

Combobox DisplayMember & ValueMember Understanding

Asked by SamB in Microsoft Visual Basic.Net, .NET, Visual Studio .NET 2005

Tags: Vb.net, Visual Studio 2005

Hi Experts,

I'm not sure if I understand the meaning of displaymember and valuemember correctly on combobox's but in relation to my MS Access experience, I understand the first is what's displayed in the combobox and the second is what value is used when a selection is made?

I have a windows form that has a bound combobox on it and I have set the datasource to a seperate table which stores the combobox list. I then set the displaymember (and this a string (it's a name)) and the valuemember (which is a unique integer).

This shows the displaymember as required and I can select from the list - but when I attempt to move onto the next record in my dataset it will not. I assume it won't accept the string in the combobox - as it's bound to a field of integer type - and is attempting to store this integer not the valuemember string?

Not sure how well I've explained that!

Any assistance, as usual much appreciated.

Best regards,

Sam
Start Free Trial
[+][-]02.05.2008 at 03:38AM PST, ID: 20822120

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .NET, Visual Studio .NET 2005
Tags: Vb.net, Visual Studio 2005
Sign Up Now!
Solution Provided By: jpaulino
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.05.2008 at 04:45AM PST, ID: 20822414

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 06:07AM PST, ID: 20822893

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 06:11AM PST, ID: 20822917

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 09:01AM PST, ID: 20824634

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628