How to insert at first

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

I have a dropdownlist, and it's Items is bound to a TableAdapter.
After the Dropdownlist bound, I want to add a items to the DropDownList's
Items, but it always at bottom.

How can I add the new items at the top?
 
Like this:
myDropDownList.Items.Insert(0, "new value")



I have a dropdownlist, and it's Items is bound to a TableAdapter.
After the Dropdownlist bound, I want to add a items to the DropDownList's
Items, but it always at bottom.

How can I add the new items at the top?
 
And if you want to give both text and value, then

myDropDownList.Items.Insert(0, New ListItem("text","value"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top