|
-
Nov 11th, 2007, 06:12 PM
#1
Thread Starter
Junior Member
How To : Blank Line at Top of Combobox
I am using the following code to populate a combobox whose SelectedValue property is used to build part of an SQL string to do a lookup in a table.
'Get Everything in a Dataset Object
objData.SQL = "SELECT ConsignorID, ConsignorName FROM Consignors"
objConsignorDS = New DataSet
Call objData.FillDataSet(objConsignorDS, "Consignors")
dtConsignors = objConsignorDS.Tables(0)
'Bind the Consignors ComboBox
cboConsignor.DataSource = objConsignorDS.Tables("Consignors")
cboConsignor.DisplayMember = "ConsignorName"
cboConsignor.ValueMember = "ConsignorID"
The issue I have is that I am stuck with always having one Combobox item displayed, so the SQL statement cant be used currently to select "ALL" .
I need to find out how to setup the combobox with an "ALL" as one of the selections given the method being used above. If I need to change it, then I will do that.
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|