Search code examples
apache-flexactionscript-3eventsfocusadvanceddatagrid

Triggering Function Event on Selecting a row in an Advanced Data Grid


The Following code seems to only be working when i have editable="true" on the Advanced Data Grid. But I don't want it it be editable. Anyone have any idea or experience with this issue?

The docs don't say anything about it needing to be editable, and i dont see why it should need to be.

http://docs.huihoo.com/flex/4/mx/events/DataGridEvent.html#ITEM_FOCUS_IN

a_data_list.addEventListener(AdvancedDataGridEvent.ITEM_FOCUS_IN, clickedRow);


    public function clickedRow(event:AdvancedDataGridEvent):void
                {
                    trace("datagrid line was clicked");

                }

Solution

  • Actually, sorry christophe, the proper solution to the issue is using

    ListEvent.ITEM_CLICK

    Because for example if the highlighted item is already highlighted it will not trigger the function because it does not "change" what does work perfectly for this issue though is item click. But thanks for pointing me in the right direction