J
juli jul
Hello I want to add data to comboBox from a dataset and doing it this
way:
public OpenDatabase(DataSet ds_db)
{
this.comboBox1=new ComboBox();
this.comboBox1.DataSource=ds_db.Tables[0];
this.comboBox1.DisplayMember = "name";
InitializeComponent();
}
if I am erasing the line :this.comboBox1=new ComboBox()- I get an error
,if I leave it the combobox is empty . How to add the data to it?
Thanks!
way:
public OpenDatabase(DataSet ds_db)
{
this.comboBox1=new ComboBox();
this.comboBox1.DataSource=ds_db.Tables[0];
this.comboBox1.DisplayMember = "name";
InitializeComponent();
}
if I am erasing the line :this.comboBox1=new ComboBox()- I get an error
,if I leave it the combobox is empty . How to add the data to it?
Thanks!