ListItems are added in reverse order

G

Guest

Hi,

I have a listbox called lstFolders.
I select the folder names from a database and return them in ascending
order.

However, when I do the listbox.items.insert(0, new instance)
method, the items that are supposed to come back on in ascending order
are the exact opposite order. The first one is at the bottom of the list.

I'm assuming that the first, second, and so forth are pushed down in the
list
as a new one is added. How do I get them returned in the correct order?

Do
 
W

William F. Robertson, Jr.

Try chaning the code over to ListBox.Items.Add( new instance )

That will retain the order they are added in.

Or you could set the order by to desc.

HTH,

bill
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top