Get the value of the combobox so I can use it..

azae

Newcomer
Joined
Jan 6, 2005
Messages
18
Visual Basic:
try
			{
				string query1 = "SELECT DISTINCT CaseNo FROM ReceivingImport WHERE InvoiceNo='"+combo_Invoice.Items+"'";
				
				SqlCeDataAdapter adapter = new SqlCeDataAdapter(query1,conn);
				DataSet dtSet = new DataSet();
				
				adapter.Fill(dtSet,"ReceivingImport");
				
				combo_CaseNo.DataSource=dtSet.Tables["ReceivingImport"];
				combo_CaseNo.DisplayMember="CaseNo";
this code is C#. I am using combobox to do the selection.
I tried all possible methods for object combo_Invoice. But none of them give the value of the string display on the selection.
I even tried on text too.
How can it be solve
 
I have no idea what you are trying to say, but if you want to read the selected text you can see it either in combobox.Text or combobox.SelectedText
 
Back
Top