Arguement Exception

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

Guest

Hi All,

I'm encountering problem when manually added value in to a combo box.

Previously the combo box has been fetch from the Dataset. Whenever i add in
my code as below:

cbTerritory.Items.Add("*")

An arguement exception will prompt in PPC. If I take out dataset and
manually add in the value, the code is working.

Am I left out something or the combo box in compact framework can't work in
..Net? This has been work in eVB.

Any advice is much appreciated. Thanks.
 
If you have used databinding's to link the combo box to the dataset,
then this cannot work since the item you are adding is not part of the
original dataset.

Either add the '*' item to the dataset or loop thru the rows in the
dataset manually adding them to the combo box items or create a
separate arraylist which you manuall add in the dataset rows plus the
'*' and then databind to this.

Chris
 
Back
Top