harocool 0 Newbie Poster

I have two requirements regarding a combobox.
First is:

I am trying to store a new item into a combobox which in turn will store in a xml file. But the problem is i need to store only unique values in xml file. I had used foreach statement to solve the issue but it doesn't work. Is there any other method?

Second is:

I have to insert a item into a datagridview whenever a item is selected on a button click. Here also i need to check in datagrid whether the item is present already.

Note : for loop works only when there is no item in the datagrid. By default am retrieving some items from datagridview (i.e 3 items)..