Re: Adding extra items to a drop down list

From: pitcher17 (spot_at_magma.ca)
Date: 04/19/04


Date: Mon, 19 Apr 2004 12:13:08 -0400

Thanks for the response. Is 32 the position in the option array or is it
the value? If it is the value how do you specify what position? First
entry is not a problem. I'd just call that before the databind (I assume)?

TIA
Steve

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:%23Q9j%23giJEHA.1340@TK2MSFTNGP12.phx.gbl...
> Dropdownlist.items.insertat(32,"vapor")
>
> --
> Regards,
> Alvin Bruney [ASP.NET MVP]
> Got tidbits? Get it here...
> http://tinyurl.com/27***
> "pitcher17" <spot@magma.ca> wrote in message
> news:NZ6dnXUn7NuJZR7dRVn-hA@magma.ca...
> > 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
> >
> >
>
>