# Removing Items from C1ComboBox

Learn how to remove Items from C1ComboBox in ComponentOne Input for WinForms.

## Content



All Items or specific items can easily be removed from the C1ComboBox programmatically or at design time through the **Strings Collection Editor**.

**Removing All Items Programatically**

To programatically remove all items from C1ComboBox, complete the following:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
c1ComboBox1.Items.Clear()
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
c1ComboBox1.Items.Clear();
```

DOC-DETAILS-TAG-CLOSE

**Removing an Item Programatically**

To programatically remove an item use the **Remove** or **RemoveAt** methods. The Remove method removes the specified item or selected item. The RemoveAt method removes the item with the specified index number.

The following code shows how to use the Remove and RemoveAt methods to remove specific items or remove selected items:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
' To remove item with index 0:
                    c1ComboBox1.Items.RemoveAt(0)
                    ' To remove currently selected item:
                    c1ComboBox1.Items.Remove(ComboBox1.SelectedItem)
                    ' To remove "Chicago" item:
                    c1ComboBox1.Items.Remove("Chicago")
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
// To remove item with index 0:
                    comboBox1.Items.RemoveAt(0);
                    // To remove currently selected item:
                    comboBox1.Items.Remove(comboBox1.SelectedItem);
                    // To remove "Chicago" item:
                    comboBox1.Items.Remove("Chicago");
```

DOC-DETAILS-TAG-CLOSE

## See Also

[Populating C1ComboBox with Data Using SelectedItemChanged Event](/componentone/docs/win/online-input/usingthec1inputcontr/c1inputcontrols/C1ComboBoxControlOverview/ComboBoxwithDataUsingSelectedItemChanged)