ietprofessional
Programmer
Hi Everyone,
I've read this article on creating an editable dropdownlist:
FYI: I have framework 1.1 and vs.net 2003.
I've did everything the article said to do but I keep getting the data without the comboboxes.
Here are the steps I took.
1. I downloaded the files and unzipped them into my directory.
2. I added the control (dll) to my menu so that I could easily add the control to my page.
3. Added the control to my form.
3. I added the code to automatically fill the dropdown.
4. Put the combobox.htc and images directory in my project folder.
5. Built the project.
The problem is I'm getting data but it, looks like plain text, no combobox. It actually looks like a label of the account names concatenated.
What am I doing wrong here? Can someone join me on this journey?
THANKS!
I've read this article on creating an editable dropdownlist:
FYI: I have framework 1.1 and vs.net 2003.
I've did everything the article said to do but I keep getting the data without the comboboxes.
Here are the steps I took.
1. I downloaded the files and unzipped them into my directory.
2. I added the control (dll) to my menu so that I could easily add the control to my page.
3. Added the control to my form.
Code:
<%@ Register TagPrefix="cc1" Namespace="ProgStudios.WebControls" Assembly="ProgStudios.WebControls" %>
...
<cc1:ComboBox id="ComboBox1" runat="server" DataSource="<%# dataView1 %>" DataValueField="accountnameid" DataTextField="accountname" /></TD>
3. I added the code to automatically fill the dropdown.
Code:
Protected dataView1 As DataView
Dim sqlConn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("SQLServer"))
Dim ds As DataSet = New DataSet
sqlConn.Open()
Dim objCmd As SqlCommand = New SqlCommand("getAccountNames", sqlConn)
Dim adapter As SqlDataAdapter = New SqlDataAdapter(objCmd)
objCmd.CommandType = CommandType.StoredProcedure
adapter.Fill(ds)
dataView1 = New DataView(ds.Tables(0))
ComboBox1.DataBind()
4. Put the combobox.htc and images directory in my project folder.
5. Built the project.
The problem is I'm getting data but it, looks like plain text, no combobox. It actually looks like a label of the account names concatenated.
What am I doing wrong here? Can someone join me on this journey?
THANKS!