jAdams i hope that i understandd you question right! if yes this code my help
you
SqlConnection conn=new SqlConnection("server=127.0.0.1; initial catalog=
northwind; integrated security =SSPI");
string sqlQuer="select * from customers";
SqlDataAdapter sqlDr=new SqlDataAdapter(sqlQuer,conn);
DataSet ds=new DataSet();
sqlDr.Fill(ds);
this.comboBox1.DataSource=ds.Tables[0];
this.comboBox1.DisplayMember="CustomerID";
--
happy coding
Muhanad YOUNIS
MCSD.NET
"jAdams" wrote:
Quote:
I am new to .NET/have MS Access background. How do I create a combobox look
up list on a data entry form like I could in Access? In Access it was
simple, set a couple of properties and the result was all the possible values
from a lookup table would be displayed in the combobox. The user would pick
or start typing the field value which would scroll to possible choices and
then select the proper field entry and once the record was completely entered
it would be added to the main data table. How do I achieve this result in
.NET? Do I use seperate data adpaters or datasets? Any help would be
greatly appreciated! |