Click here to Skip to main content
15,905,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Good day

I have read my values from a database to a combobox using a dictionary. I want to select a specefic value from a combobox

I have written the follwing code, but its not working


         if (cmbRplStatus.DisplayMember == "2")
                        {
                           Do something                        
}


Whats wrong with this code?

Thanks
Posted
Updated 13-Mar-12 3:18am
v7
Comments
Aniket Yadav 13-Mar-12 8:08am    
Your Question was not clear... Please elaborate more
El_Codero 13-Mar-12 8:08am    
The question is what you're trying to achieve with it? You can also refer an id to combobox items and compare it with this id i.e. Best Regards

1 solution

Your question is not very clear; are you talking about the SelectedIndex[^] property?
 
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