PDA

View Full Version : Combobox, and processing items dynamically



vasmann
22 Nov 2007, 6:27 AM
Hello there.
I've got a problem.
I have two comboboxes, and content of second one should be changed according to content first one.
First combobox represents users (their names), so, when I select one's name, I should get his groups in second combobox.
I subscribed for event of first combo - select, and all is fine there.
then I get second one combo, clear it's store items:


groups_combo.store.removeAll();
groups_combo.store.commitChanges();

After that, I fill groups_combo store with new data, and call commitChanges() again.
And in fire bug I can see, that in store there are records I've just added, but they didn't appear on screen. And if I make these steps with static data (I mean when I create combo, before it's render) and render (show) combo box - I have my groups at place.

So there is the question:
Is it possible to dynamically change content of combobox?
Thank you.

alleno
23 Nov 2007, 11:02 AM
There is a tutorial on linking comboboxes (http://extjs.com/learn/Tutorial:Linked_Combos_Tutorial_for_Ext_2). Maybe that will help?