开发者

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 开发者_如何学JAVAto 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");

                }


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜