|
-
Oct 16th, 2007, 06:39 PM
#1
Thread Starter
Hyperactive Member
[2005] Combobox / Data Bind
I have a combobox tied to a database. It loads CustomerNameLast as the display member and CustomerID as the Value Member.
Is it possible to have 2 display members shown? As in: CustomerNameLast, CustomerNameFirst (EG: Doe, John)
-
Oct 16th, 2007, 06:41 PM
#2
Re: [2005] Combobox / Data Bind
No. There are examples in various places of extended ComboBoxes that add that functionality but the standard ComboBox class won't do it.
-
Oct 17th, 2007, 05:38 PM
#3
Hyperactive Member
Re: [2005] Combobox / Data Bind
Why not have in your data adapter a query like:
Select CustomerID, LastName, FirstName, LastName + CHAR(9) + FirstName AS LNFN
From MyTable
Make LNFN as the display Member and keep CustomerID as your Value Member
It should then display
Doe Jane
Doe John
etc.
P.S. DOn't forget to generate the DataSet after making the change.
Last edited by Always_Confused; Oct 17th, 2007 at 05:47 PM.
If you find information helpful from any member, please take a second and rate their post. Its a nice gesture of your appreciation.
"I have not failed 10,000 times. I have successfully identified 10,000 ways that will not work" Thomas Edison
Do illiterate people get the full effect of Alphabet Soup?
ADO FAQ 2005-2008 Masked Textbox Patch FoxPro Date MZ Tools Great Free Tool
-
Oct 17th, 2007, 05:51 PM
#4
Thread Starter
Hyperactive Member
Re: [2005] Combobox / Data Bind
I just resorted to adding a column called CustomerName, which contains lastname and firstname: "Doe, John".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|