开发者

Is it possible to call the function by using the datagrid column?

Is it possible to call the f开发者_开发技巧unction by using the datagrid column item? I want to call the function while the user click the particular column item in the datagrid? Thank's in advance...


You have to assign an eventhandler on the datagrid, and use a switch, which calls a function based on what you clicked on.

myDataGrid.addEventListener(DataGridEvent.ITEM_FOCUS_IN,clickFunction);


    private function clickFunction(e:DataGrigEvent):void
    {
        switch(e.label)
        {
             case 'function1': function1(); break;
             case 'function2': function2(); break;
             ...
        }

    }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜