---
id: "M:cAlgo.API.MultiSelect.AddItem(System.String)"
kind: "method"
type: "T:cAlgo.API.MultiSelect"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/AddItem/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# MultiSelect.AddItem

Member of [MultiSelect](https://help.ctrader.com/ctrader-algo/references/Controls/MultiSelect/index.md).

## AddItem(string item)

Adds a new item to the MultiSelect

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public bool AddItem(string item)
```

Python:

```python
multiSelect.AddItem(item: str) -> bool
```

### Parameters

- `item` (`string`, Python `str`): The string value that will be added on MultiSelect

### Returns

`bool` — True if add succeeded otherwise False

Available since cAlgo.API 5.6.

### Examples

C#:

```csharp
var multiSelect = new MultiSelect();
var isAdded = multiSelect.AddItem("XAUUSD");
var isDuplicateAdded = multiSelect.AddItem("XAUUSD");
Chart.AddControl(multiSelect);
Print("Added: {0}, duplicate added: {1}", isAdded, isDuplicateAdded);
```

Python:

```python
multiSelect = MultiSelect()
isAdded = multiSelect.AddItem("XAUUSD")
isDuplicateAdded = multiSelect.AddItem("XAUUSD")
api.Chart.AddControl(multiSelect)
api.Print(f"Added: {isAdded}, duplicate added: {isDuplicateAdded}")
```

