Just a guess, Einar ... but did you already have the DataSource set, then added a new item to the collection?
~~Bonnie
>I found this a little odd this morning. Considder the code below:
>
>
>this.oXPortCollection.Add(oXPrt);
>
>// Without the line below the new item added above does not show up in the combobox
>this.cboSboxes.DataSource = null;
>
>this.cboSboxes.DataSource = this.oXPortCollection;
>
>
>At first I did not have the line setting the DataSource to null but without that line the combobox did not display the newly added item to the collection. I added the collection to the watch window and could see that the new item was in there. I also wrote to the console all the items in the collection.
>
>Why do I have to set the DataSource to null first?
>
>I also experimented with code where I created a new collection, added the new item then looped through the old collection and added all the items from the old collection to the new collection. Then I set the old collection to equal the new collection and set the combobox' datasource to the old collection, in that case I did not have to set the datasource to null first.
>
>Any thoughts.
>
>Thanks,
>Einar