Updating ComboBox DataSOurce

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an ArryList that I'm using as a datasource for a combobox. As an item is selected in the combobox and processed I'd like to remove it from the combobox. When I try I get an error stating that the arraylist is being used as a datasource and can't be updated. I can't remove it as the datasource for the combobox so I can update it and reassign it back as the datasource. Anyone got a workaround?
 
If I understand you correctly, you are bound to an Array, but want to remove
the item from the ComboBox. If this is the case you are asking .NET to do
contradictory things, either its bound or not.

If you want to mainain the data in the array and simply choose not to
display certain items then perhaps you need to consider copying the data to
another array and removing the item from the array instead.

Regards - OHM


Bob said:
I have an ArryList that I'm using as a datasource for a combobox. As an
item is selected in the combobox and processed I'd like to remove it from
the combobox. When I try I get an error stating that the arraylist is being
used as a datasource and can't be updated. I can't remove it as the
datasource for the combobox so I can update it and reassign it back as the
datasource. Anyone got a workaround?
 
doh,

I was almost giving an answer as this in the next thread from Bob and than
thought, cannot be there must be something why OHM is not giving this
answer..

And now I see I am right.

Cor
 
Back
Top