Hello,
I am trying to move multiple items from one list box to another, i have tried the following code, but the output so far just gives me "{collectio n}" in the other list box.
i'm using C# in visual studio 2008, any ideas would be appreciated!
Thanks,
Pal
I am trying to move multiple items from one list box to another, i have tried the following code, but the output so far just gives me "{collectio n}" in the other list box.
Code:
private void btnMoverr_Click(object sender, EventArgs e)
{
//lstBoxr.Items.Add(lstBoxl.SelectedItems);
//lstBoxl.Items.Remove(lstBoxr.SelectedItems);
while (lstBoxl.SelectedItems.Count > 0)
{
lstBoxr.Items.Add(lstBoxl.SelectedItems);
lstBoxl.Items.Remove(lstBoxl.SelectedItems);
}
//lstBoxr.SelectedItems.Add(lstBoxl.SelectedItems);
//lstBoxl.SelectedItems.Remove(lstBoxl.SelectedItems);
}
Thanks,
Pal
Comment