Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DropDownList initialization question
Message
From
04/05/2004 16:37:35
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00900902
Message ID:
00900934
Views:
59
YOWSA... I didn't even see the WEB FORMS category. Had I seen it, I woulnd't have responded. Havent' done the webforms thingy yet. Sorry.



>John,
>Maybe I did this wrong. I got an error...
>here's what I did
>
>        '--------------------------
>        ' Create the SelectCommand...for Contacts.Company
>        '--------------------------
>        oledbCMD = New OleDbCommand("SELECT DISTINCT Company " & _
>                                            "FROM Contacts " & _
>                                            "ORDER BY Company", _
>                                    oledbConn)
>        '
>        oledbDA.SelectCommand = oledbCMD
>        oledbDA.Fill(oledbDS, "CompanyLookup")
>        '
>        cboCompanyLookup.DataSource = oledbDS.Tables("CompanyLookup")
>        '
>        cboCompanyLookup.DataTextField = "Company"
>        cboCompanyLookup.DataValueField = "Company"
>        cboCompanyLookup.EnableViewState = True
>        cboCompanyLookup.DataBind()
>        cboCompanyLookup.SelectedValue = -1
>        '--------------------------
>
>
>
>
>---------------
>>set this.cboName.selectedvalue = -1
>>
>>>I want to have a blank as the first entry in my DropDownList.
>>>When I populate the list from a table, how can I arrange for the first entry to be blank, if every row of my table has the field populated?
>>>
>>>TIA,
>>>Rick
Previous
Reply
Map
View

Click here to load this message in the networking platform