I have Two Drop down one name as Branch and other as Employee .Both are related to each other. I have a scenario if a branch selected first and then employee Drop down show only employees related to each other. Its working fine .
There is a bug in this code when user select first branch and then employee and then again select some other branch then this drop down of Employee get reset and it show selected index as blank ,but value in drop down variable remain previous one due to which its reterving wrong result.
I do not want to set a selected index = -1 in every change handler ,i just want to write some generic code when service return the result of this drop down.*
var event:IndexChangedEvent = new IndexChangedEvent(IndexChangedEvent.CHANGE,
false, false, -1, this.selectedIndex);
dispatchEvent(event);*
Please Guide me with this so i do not have to rewrite the code for each drop down
I want to add code in my custom component on a service return .Please help me with
as I am new in flex.**
I'm guessing you're using the same event in both directions, so each Dropdown is being reset for selecting the other one.
I'm not sure you will need custom events in order to do so, unless you're using additional information. Simply separate the code for your two Dropdown ListEvent.CHANGE events: