Click here to Skip to main content
15,914,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
objConn1.Open();
SqlDataAdapter d = new SqlDataAdapter("select Itemno from ITdata", objConn1);
DataSet dt = new DataSet();
d.Fill(dt);
comboBox4.DataSource = dt.Tables[0]; /// assing the first table of dataset
comboBox4.DisplayMember = "Itemno";
objConn1.Close();
Posted
Updated 13-Jun-12 23:50pm
v2
Comments
Richard MacCutchan 14-Jun-12 5:52am    
You need to give more detail about what is happening, or not happening, here. Where is the related ComboBox and how does it connect to the data that you are trying to display?
Master Vinu 14-Jun-12 6:22am    
iam selecting item in combobox 4 for eg:itemno,as well as i have 2 textboxes on form which shows item name and deparment
so i want data in textbox related to selected combobox item
Richard MacCutchan 14-Jun-12 6:58am    
So where is the code that handles the select operation and fills the text boxes?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900