G
Guest
Hi,
I have auser control with two listboxes on it. When the user selects one or
several items in the left box and clicks Add, they are copied into the
listbox on the right. When the user selects one or multiple items in the
listbox on the right (lstSelected) I want to remove the selected items.
I tried doing it like this (for one):
lstSelectedList.Items.Remove(lstSelectedList.SelectedIndex)
and it doesn't throw an error, but no items are removed.
What is wrong with my code?
Also, how do I code it so that if the user selects multiple items, they are
removed?
thanks
Philip
I have auser control with two listboxes on it. When the user selects one or
several items in the left box and clicks Add, they are copied into the
listbox on the right. When the user selects one or multiple items in the
listbox on the right (lstSelected) I want to remove the selected items.
I tried doing it like this (for one):
lstSelectedList.Items.Remove(lstSelectedList.SelectedIndex)
and it doesn't throw an error, but no items are removed.
What is wrong with my code?
Also, how do I code it so that if the user selects multiple items, they are
removed?
thanks
Philip