How to get selected ID from combobox

A

Anders j

Hi

I have a Dropdown field connected to a Group with two attributes
representing ID and Text.

Now. How do i get the selected ID. When i get the Value on the node i get
the Text but not the ID. I am talking about codebehind Infopath 2007 c#.

Any ideas?

Anders
 
R

RP

You can get only value from the drop down field. You can set either
ID or Text.

Specify the desired field in the "Value" portion of the drop down List
Box Properties window. You can set different sibling node for
"Display Name"

Hth,
RP
 
K

kc.reddy.2000

You can get only value from the drop down field. You can set either
ID or Text.

Specify the desired field in the "Value" portion of the drop down List
Box Properties window. You can set different sibling node for
"Display Name"

Hth,
RP

Hi RP,

Please help me achieve this. Thanks in Advance.

I have a dropdownlistbox with 4 Items, which are entered manually like

Value DisplayName

0 Patient

1 Nurse

2 Doctor

3 Referral

Lets say user selects Nurse, I want to send Nurse to the database and
not 1 but when I use the code

mainNav1.SelectSingleNode("/dfs:myFields/my:ComboReason",
NamespaceManager).Value it returns 1 but I want to get the actual
DisplayName, how can I do it plz let me know ASAP.

Thanks very much guys

Cheers

Chandra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top