Click here to Skip to main content
15,792,397 members
Please Sign up or sign in to vote.
2.00/5 (3 votes)
See more:
Please can some describe how to
programmatically populate a combo box
at runtime in a windows application
using C#? [confused]
Posted

1 solution

get the data from db & assign to datatable. Then assign to combobox.
dropdownlist1.DataTextField = "Textfield";
dropdownlist1.DataValueField = "Valuefield";
dropdownlist1.DataSource = datatableData;
dropdownlist1.DataBind();
 
Share this answer
 


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