J
Jason P Opdycke [MSFT]
Hello All -
I have 2 list boxes. Items in Left list box populated from a DB. I remove
an item from the left box and add an item to the right box to allow user
selection. When that item is removed again, the item is in the bottom of
the listbox on the left.
Here is the remove code snippet.... How do I sort to original alphabetical
state when the item is removed?
Dim list As New ArrayList
For Each item As ListItem In lstDest.Items
If item.Selected Then
lstSource.Items.Add(item)
list.Add(item)
End If
Next
For Each item As ListItem In list
If item.Selected Then
lstDest.Items.Remove(item)
End If
Next
Thanks to ALL
I have 2 list boxes. Items in Left list box populated from a DB. I remove
an item from the left box and add an item to the right box to allow user
selection. When that item is removed again, the item is in the bottom of
the listbox on the left.
Here is the remove code snippet.... How do I sort to original alphabetical
state when the item is removed?
Dim list As New ArrayList
For Each item As ListItem In lstDest.Items
If item.Selected Then
lstSource.Items.Add(item)
list.Add(item)
End If
Next
For Each item As ListItem In list
If item.Selected Then
lstDest.Items.Remove(item)
End If
Next
Thanks to ALL