| DHTMLX Documentation

# Managing select box collection (co, coro excells)

The following method can be used to get a select box collection common for the whole column:

> combo = grid.getCombo(index);

If you need a collection to be specific for a cell:

> combo = grid.getCustomCombo(index)

The collection supports the following API:
combo.put(value,label) - adds a new record in the collection;
combo.remove(value) - removes a record from the collection;
combo.clear() - removes all records from the collection;
combo.size() - returns the current size of the combo box;
combo.get(value) - returns the label by value;
combo.getKeys() - returns the array of all possible values;
combo.save() - saves the current state;
combo.restore() - restores the previously saved state.
The less common use-case is the one that gets the value by the label. This can be done using the following code:

> var value = combo.values[combo.keys._dhx_find(key)];

© DHTMLX, 2008