Click here to Skip to main content
15,891,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: connection string in web.config file Pin
MudkiSekhon3-Dec-05 1:36
MudkiSekhon3-Dec-05 1:36 
QuestionMenuStrip ShortcutKeys Pin
khan20002-Dec-05 16:48
khan20002-Dec-05 16:48 
QuestionSysListView32 Events Pin
Clickok2-Dec-05 15:19
Clickok2-Dec-05 15:19 
QuestionDebug ARX in Autocad2006 Pin
GazzaGarray2-Dec-05 12:45
GazzaGarray2-Dec-05 12:45 
QuestionFile Operations Pin
dvsr2-Dec-05 11:50
dvsr2-Dec-05 11:50 
AnswerRe: File Operations Pin
S. Senthil Kumar2-Dec-05 23:23
S. Senthil Kumar2-Dec-05 23:23 
GeneralRe: File Operations Pin
dvsr5-Dec-05 3:46
dvsr5-Dec-05 3:46 
QuestionAssociating values to a combo box Pin
Caio19852-Dec-05 10:23
Caio19852-Dec-05 10:23 
Hi everybody.

I'm developing a program which has a combobox with all client names but as client name is not the primary key, or better: unique, on the database, some itens on the combo box are repeated, so this way there is more than one person with the same name.
In order to solve that I'd like to know if it is possible to associate another value (preferable an unique ID which would be loaded from the database) for each item on the combo box, but in a way that the program user would see only the name on the combo, not this unique ID, which would be used by the program.

If my explanation was not clear:
- I'd like to have this user view on the combo box:

John Wallace
Marck Keen
Isaac May
John Wallace

The way it is right now (no associated values) I can't do a query that would retrieve me only one row, because using "select * from table where name = ' + combo.SelectedItem.toString() + "'"; it would retrieve me 2 rows if, for example, I select John Wallace which has 2 occurences on the same combo.

So, behind the scenes, I'd like to retrieve the unique id from the selected item. So the program would have that:

John Wallace 344072407
Marck Keen 40947047
Isaac May 483609
John Wallace 20648

Thus, I can make a different selection based on the name, like:
"select * from table where uniqueID = ' + combo.SelectedItem."somethingThatWouldRetrieveMeTheUniqueID" + "'";

Thank you !
AnswerRe: Associating values to a combo box Pin
Robert Rohde2-Dec-05 12:11
Robert Rohde2-Dec-05 12:11 
GeneralRe: Associating values to a combo box Pin
Caio19852-Dec-05 15:23
Caio19852-Dec-05 15:23 
AnswerRe: Associating values to a combo box Pin
Kallol Roy2-Dec-05 19:40
Kallol Roy2-Dec-05 19:40 
QuestionQuestion about TextBox control Pin
Stanciu Vlad2-Dec-05 10:12
Stanciu Vlad2-Dec-05 10:12 
AnswerRe: Question about TextBox control Pin
Jared Parsons2-Dec-05 11:36
Jared Parsons2-Dec-05 11:36 
GeneralRe: Question about TextBox control Pin
Stanciu Vlad3-Dec-05 2:28
Stanciu Vlad3-Dec-05 2:28 
AnswerRe: Question about TextBox control Pin
Rob Philpott2-Dec-05 11:53
Rob Philpott2-Dec-05 11:53 
GeneralRe: Question about TextBox control Pin
Stanciu Vlad3-Dec-05 2:25
Stanciu Vlad3-Dec-05 2:25 
GeneralRe: Question about TextBox control Pin
Rob Philpott3-Dec-05 3:29
Rob Philpott3-Dec-05 3:29 
QuestionThreading problem Pin
mav.northwind2-Dec-05 9:50
mav.northwind2-Dec-05 9:50 
AnswerRe: Threading problem Pin
Jared Parsons2-Dec-05 11:37
Jared Parsons2-Dec-05 11:37 
GeneralRe: Threading problem Pin
mav.northwind2-Dec-05 12:03
mav.northwind2-Dec-05 12:03 
GeneralRe: Threading problem Pin
S. Senthil Kumar2-Dec-05 21:13
S. Senthil Kumar2-Dec-05 21:13 
GeneralRe: Threading problem Pin
mav.northwind2-Dec-05 21:52
mav.northwind2-Dec-05 21:52 
QuestionCrystal Report ParameterFields Pin
Bedevian2-Dec-05 9:28
Bedevian2-Dec-05 9:28 
QuestionMDI child forms states Pin
Ammar Ben Hadj Amor2-Dec-05 8:14
professionalAmmar Ben Hadj Amor2-Dec-05 8:14 
AnswerRe: MDI child forms states Pin
Dave Kreskowiak2-Dec-05 10:47
mveDave Kreskowiak2-Dec-05 10:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.