0

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");

                }
brybam
  • 5,009
  • 12
  • 51
  • 93

2 Answers2

0

You need to listen to the "change" (ListEvent.CHANGE) event if you want to know when rows are selected/deselected.

Christophe Herreman
  • 15,895
  • 9
  • 58
  • 86
  • Thanks! That did it. Not sure why it couldn't just be done with the advanceddatagrid event...but whatever, glad its working. thanks! – brybam Feb 22 '11 at 08:58
0

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

brybam
  • 5,009
  • 12
  • 51
  • 93