Hi..
Oues : Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Jan 23, 2012, 11:29 AM
When we use Databind method for the Combobox we set DisplayMember to display data in the combo box.
Ex:-
str = "select * from student";
com = new SqlCommand(str, con);
sqlda = new SqlDataAdapter(com);
ds = new DataSet();
sqlda.Fill(ds, "student");
comboBox1.DataSource = ds.Tables["student"];
comboBox1.DisplayMember = "sid";
Thanks