Search code examples
apache-flexmouseeventitemrendereradvanceddatagrid

Flex ItemRenderer not passing mouseover to parent


In an AdvancedDataGrid using an MXAdvancedDataGridItemRenderer, mouseover was not being passed on to the AdvancedDataGrid.
After days of struggle, I wanted to share this: In your data setter, assign super.data with the new value for mouse events to be bubbled (?!)

Example (doesn't work)

        override public function set data( value:Object):void {             
            var latency:Number = value[ ( this.listData as DataGridListData).dataField] as Number;

            // Do cool stuff 

Example (works)

        override public function set data( value:Object):void {             
            var latency:Number = value[ ( this.listData as DataGridListData).dataField] as Number;
            super.data = value;

            // Do cool stuff 

Solution

  • The example above works. Hope it can save you the time it took me to figure out.