PDA

View Full Version : How to add a trigger between two ComboBox?



zsumore
28 Aug 2008, 6:22 PM
ComboBox One has two model: Car A and Car B.
ComboBox Two has three model: white, red and blue.

Car A has two color:white and red.
Car B has two color:red and blue.

How could i add a trigger : when ComboBox One select Car A, ComboBox Two display only white and red?

eugenparaschiv
28 Aug 2008, 11:13 PM
ComboBox One has two model: Car A and Car B.
ComboBox Two has three model: white, red and blue.

Car A has two color:white and red.
Car B has two color:red and blue.

How could i add a trigger : when ComboBox One select Car A, ComboBox Two display only white and red?

Why insert a trigger between the boxes? It sounds to me that the two combo boxes are enough, and that you only need to add listeners so that a selection in the first changes the model of the second box. If you really need a trigger, look at the implementation of TriggerField and TwinTriggerField, or simply add an IconButton between the two.

zsumore
29 Aug 2008, 12:05 AM
My problem is the same as http://extjs.com/forum/showthread.php?t=38571

And i have found the answer, thanks.