Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Pls Ans....
How to add Values and Items to the ComboBox in C# in Win Form..?
Posted
Updated 18-Oct-10 19:35pm
v3

It's quite easy, you will find many solutions if you try to find it online.

just assign DisplayMember and ValueMember with the column name of your datasource and you will have your ComboBox filled.

E.g

Combo.DisplayMember = "ABC";
Combo.ValueMember = "XYZ";


Is it ?

Please vote and Accept Answer if it Helped.
 
Share this answer
 
Example:

for (int i = 0; i < 10; i++)
comboBox1.Items.Add(i.ToString());
 
Share this answer
 
;P
please find many solutions in google
 
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