HighTechTalks DotNet Forums  

combobox control

Dotnet Data Tools microsoft.public.dotnet.datatools


Discuss combobox control in the Dotnet Data Tools forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jAdams
 
Posts: n/a

Default combobox control - 09-06-2005 , 12:25 PM






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!

Reply With Quote
  #2  
Old   
mos2128
 
Posts: n/a

Default RE: combobox control - 10-20-2005 , 05:29 PM






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!

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.