• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

combobox dropdown

vs2012 user
I have a combo box bound to data source
Is there a way to see at least 2 fields from the dataset in the dropdown mode before I select the dropdown item I want to commit to the field (left click the mouse)
Right click on the Item will do but I don't see that event
any help would be appreciated.
0
MBHEY131
Asked:
MBHEY131
  • 5
  • 2
1 Solution
 
SimonCommented:
Concatenate the two fields to display them in the dropdown. You can still bind the dropdown to the field you want, but set the column width for that field to zero so that it doesn't display.
0
 
MBHEY131Author Commented:
do you mean add a NEW FIELD to the Query that fills the COMBOBOX and that NEW FIELD is made up of 2 or more fields of data that I want to show in the drop down?, I think I understand what your saying but I don't know how to accomplish the task, but I think I can figure it out in the SQL code, I am still very green at vs2012 as I am coming off of coding in FoxPro 2.6 of all things, thanx for the info. I will update your question but it may take some time to get this functionality up and working.
Mark
0
 
SimonCommented:
>do you mean add a NEW FIELD to the Query that fills the COMBOBOX and that NEW FIELD is made up of 2 or more fields of data that I want to show in the drop down?

Yes, that is what I meant. You'd concatenate the fields in your SQL code that provides the rowsource for the combobox.
0
KuppingerCole Reviews AlgoSec in Executive Report

Leading analyst firm, KuppingerCole reviews AlgoSec's Security Policy Management Solution, and the security challenges faced by companies today in their Executive View report.

 
MBHEY131Author Commented:
That did work, took me a little time to get the SQL code right but THANX.
Mark
0
 
MBHEY131Author Commented:
But this is what I'm working on now, the dropdown gets populated with the correct concatenated data, but after the mouse selected correct code which at that point is "THE CONCATENATED DATA" (which is fine but I then would like the field populated with a different field "AFTER MOUSE SELECTION") and I've tried just about all the events within the COMBOBOX mouse up, down, enter, leave etc. to get the data chopped down to just 1 field and can't seem to present the data correctly, do you have an idea as to how this problem can be accomplished.
Thanx in advance
0
 
MBHEY131Author Commented:
THE combobox members I'm working with are primarily the "DISPLAY  MEMBER", "VALUE MEMBER" AND "SELECTED VALUE"
0
 
MBHEY131Author Commented:
Lostfocus and Gotfocus do exactly what I need
Thank You.
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now