vendredi 17 avril 2015

set multi selection in combobox programmatically

Hi,



I have a combobox with multiselection which is populated with local data through a store and a model.

I am able to intercept when a new item is selected or unselected by the user through the 'select' event.



However when the user selects the first entry, the combobox should automatically select all its items. On the other hand, if he unselects it, the combobox should automatically unselect all its items.



I tried to search on the Internet for examples with no success, so I am not able to select/unselect multiple items from code. I suspect that I should use the 'setSelection()' method, but unfortunately it is poorly documented and I do not understand what I should pass to it.



Am I correct in my assumption, and how should I do that? Else what is the correct procedure?





set multi selection in combobox programmatically

Aucun commentaire:

Enregistrer un commentaire