S
Steven K
Hello,
I have created a DropDownList that is bound to data from a stored procedure.
I also need to include a value at the top of the list ("Not In List"). I
can add an item to the bottom of the bound list with the following, but I
can't figure out how to add it to the top of the list.
Any help would be appreciated...
spBusUnit = cmdBusUnit.ExecuteReader()
ddlBusUnitBox.DataSource = spBusUnit
ddlBusUnitBox.DataTextField = "BusinessProduct_ID"
ddlBusUnitBox.DataTextField = "BusinessProduct_ID"
ddlBusUnitBox.DataBind()
spBusUnit.Close() : spBusUnit = Nothing
ddlBusUnitBox.Items.Add(New ListItem("Not In List","Not In List"))
I have created a DropDownList that is bound to data from a stored procedure.
I also need to include a value at the top of the list ("Not In List"). I
can add an item to the bottom of the bound list with the following, but I
can't figure out how to add it to the top of the list.
Any help would be appreciated...
spBusUnit = cmdBusUnit.ExecuteReader()
ddlBusUnitBox.DataSource = spBusUnit
ddlBusUnitBox.DataTextField = "BusinessProduct_ID"
ddlBusUnitBox.DataTextField = "BusinessProduct_ID"
ddlBusUnitBox.DataBind()
spBusUnit.Close() : spBusUnit = Nothing
ddlBusUnitBox.Items.Add(New ListItem("Not In List","Not In List"))