Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have combobox there are name list.i want to store selected value in another table but if i gave combo1.seelcetedvalue the it starts form 0 but i want actual value from the list like 1,2 etc..please help me?
Posted
Updated 24-Feb-14 18:20pm
v2
Comments
agent_kruger 25-Feb-14 1:21am    
sir, i suggest reframe of question.

1 solution

I believe what you want is the 'SelectedIndex property, not the 'SelectedValue property: just add #1 to it to change from zero-based addressing. However, if you are actually using 'SelectedValue, and that is working (you have a valid ValueMember property set), then, you will have convert the object returned by 'SelectedValue to a number and increment by #1 before using it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900