Buttons in AdvancedDataGrid in Flex

后端 未结 1 1539
故里飘歌
故里飘歌 2021-01-23 14:43

Is it possible to have a Button object in a column in an AdvancedDataGrid object in flex 4? And how would I do this?

1条回答
  •  甜味超标
    2021-01-23 14:50

    You can do it in flex 3, so it should be possible in flex 4 too. Here is how to do it in flex 3, modify it for spark.

    
    

    script:

    public function create():void
    {
        var array:Array = [{text:"Text1", buttonLabel:"Bt1"},
                        {text:"Text2", buttonLabel:"Bt2"}]
        ad.dataProvider = new ArrayCollection(array);
    }
    public function onClick(item:Object):void
    {
        trace(item.text);
    }
    

    0 讨论(0)
提交回复
热议问题