Combobox in run time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i need to know how to make binding for the data for a Combobox in run time
from the DB

i wrote that

this.CFaculities.DataBindings.Add(new Binding("Text" ,DS_H.Tables[0]
,"F_name"));

where F_name is the column in the table
but it tells me it can't bind the data to column F_name ??
is there any extra statemnts should be added , plz a sample code
help :)
 
comboBox1.DataSource = ds1.Tables[0];// TableName

comboBox1.DisplayMember = "CategoryName"; // ColumnName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top