edennvl
جمعه 27 شهریور 1388, 15:38 عصر
سلام دوستان
میخواستم بپرسم چطور میشه یه combobox رو به یه بانک bind کرد که اطلاعاتشو نمایش بده؟
خودم تا bind رو بلدم ولی بقیش رو بلد نیستم اینطوری هم بجای اسم "System.Data.DataRowView" اینو مینویسه
این نوشته منه:
comboBox2.DataBindings.Clear();
con.Open();
SqlDataAdapter Da = new SqlDataAdapter();
string str = "select IDS from Farm";
str += comboBox1.Text;
Da = new SqlDataAdapter(str, con);
DataSet Ds = new DataSet();
Da.Fill(Ds, "Table");
comboBox2.DataBindings.Add("datasource", Ds, "Table");
con.Close();
لطفا کمک کنید
میخواستم بپرسم چطور میشه یه combobox رو به یه بانک bind کرد که اطلاعاتشو نمایش بده؟
خودم تا bind رو بلدم ولی بقیش رو بلد نیستم اینطوری هم بجای اسم "System.Data.DataRowView" اینو مینویسه
این نوشته منه:
comboBox2.DataBindings.Clear();
con.Open();
SqlDataAdapter Da = new SqlDataAdapter();
string str = "select IDS from Farm";
str += comboBox1.Text;
Da = new SqlDataAdapter(str, con);
DataSet Ds = new DataSet();
Da.Fill(Ds, "Table");
comboBox2.DataBindings.Add("datasource", Ds, "Table");
con.Close();
لطفا کمک کنید