P
pitcher17
I'm sure this is really simple to do but I'm at a loss. I have a
dropdownlist object that I have bound to my dataset. That works fine.
However, what I want to do is add an extra static item as the first entry
and then a couple of other static entries further down the list.
Here is my databinding code for the sake of argument... (dropuser is the
name of my dropdownlist)
Dim da As SqlDataAdapter = New SqlDataAdapter(strUsers, conn)
Dim ds As DataSet = New DataSet()
da.Fill(ds, "userTable")
Dim dt As DataTable = ds.Tables("userTable")
dropuser.DataSource = ds.Tables("userTable")
dropuser.DataTextField = "user_name"
dropuser.DataValueField = "user_id"
dropuser.DataBind()
TIA,
Steve
dropdownlist object that I have bound to my dataset. That works fine.
However, what I want to do is add an extra static item as the first entry
and then a couple of other static entries further down the list.
Here is my databinding code for the sake of argument... (dropuser is the
name of my dropdownlist)
Dim da As SqlDataAdapter = New SqlDataAdapter(strUsers, conn)
Dim ds As DataSet = New DataSet()
da.Fill(ds, "userTable")
Dim dt As DataTable = ds.Tables("userTable")
dropuser.DataSource = ds.Tables("userTable")
dropuser.DataTextField = "user_name"
dropuser.DataValueField = "user_id"
dropuser.DataBind()
TIA,
Steve