ListItems are added in reverse order

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top