G
Guest
I have an arraylist (arlNAMES) that is bing used as a datasource for a
combobox. When an item is selected in the combobox I want to remove it from
both the combobox and the arraylist. This doesn't work. DOes anyone know
why and how to fix it?
Dim intPOS As Integer = cboAdvanceResponse.SelectedIndex
cboAdvanceResponse.DataSource = Nothing
arlNAMES.RemoveAt(intPOS)
arlnames.TrimToSize
arlREF.RemoveAt(intPOS)
cboAdvanceResponse.DataSource = arlNAMES
combobox. When an item is selected in the combobox I want to remove it from
both the combobox and the arraylist. This doesn't work. DOes anyone know
why and how to fix it?
Dim intPOS As Integer = cboAdvanceResponse.SelectedIndex
cboAdvanceResponse.DataSource = Nothing
arlNAMES.RemoveAt(intPOS)
arlnames.TrimToSize
arlREF.RemoveAt(intPOS)
cboAdvanceResponse.DataSource = arlNAMES