Click here to Skip to main content
15,909,591 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,
I bind my combobox by dataset,
C#
combobox1.DataSource = dataset.Tables["List"];
combobox1.ValueMember = "code";
combobox1.DisplayMember = "name";


that it work well,
now I want ,if user type something else that is not in combobox.displaymember,
do not access.
what am I doing,please help me,
thanks alot
Posted
Updated 3-Mar-12 23:04pm
v2

1 solution

Set the ComboBox DropDownStyle to ComboBoxStyle.DropDownList
 
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