0 Replies Latest reply on Jan 12, 2011 2:58 PM by Zolotoj

    Dropdownlist misbehavior

    Zolotoj Level 3

      I have to ask same question again.

      I have a Hero DataGrid where I am trying to implement a Dropdownlist as a custom renderer for a column.

      A listener is used to update Grid's data when something has been selected in the Dropdown:

      addEventListener("change", onDataChange);

       protected function onDataChange(event:Event):void
           Grid(owner).selectedItem[column.dataField] = selectedItem[column.dataField];

      The problem is when I select an item by clicking on it it takes another click to close the dropdown part. That will trigger the change event again which I could have managed but two clicks I cannot.


      Commenting out

      //Grid(owner). ....
      will fix the problem but how I can update Grid's dataProvider in this case?

      Any idea, please?


      BTW, if I drop the control down with a mouse then use keyboard to navigate to an item and enter to select it that is no problem at all.


      I have added the following code:

      var dde:DropDownEvent = new DropDownEvent(DropDownEvent.CLOSE, false, true);

      That I have borrowed from the SDK. Still does not work!!!!!!!! So, how many programmers does it take to close Dropdown????




      Message was edited by: Zolotoj


      Message was edited by: Zolotoj