Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 在Flex3中,我想在datagrid的列标记中添加一个按钮_Actionscript 3_Apache Flex_Flex3_Mxml_Itemrenderer - Fatal编程技术网

Actionscript 3 在Flex3中,我想在datagrid的列标记中添加一个按钮

Actionscript 3 在Flex3中,我想在datagrid的列标记中添加一个按钮,actionscript-3,apache-flex,flex3,mxml,itemrenderer,Actionscript 3,Apache Flex,Flex3,Mxml,Itemrenderer,我需要在datagrid标签的一列中放置一个按钮,该列的值应该出现在按钮标签上。任何帮助都将受到高度赞赏在flex 3中,请使用标记mx:itemRenderer: 在Flex3中,使用标记mx:itemRenderer: 为什么不使用flex4和spark DataGrid?为什么不使用flex4和spark DataGrid?@HugoLemons thanx寻求帮助Hugo@HugoLemons谢谢雨果的帮助 <mx:DataGrid id="myDataGrid" dataProv

我需要在datagrid标签的一列中放置一个按钮,该列的值应该出现在按钮标签上。任何帮助都将受到高度赞赏

在flex 3中,请使用标记mx:itemRenderer:

在Flex3中,使用标记mx:itemRenderer:


为什么不使用flex4和spark DataGrid?为什么不使用flex4和spark DataGrid?@HugoLemons thanx寻求帮助Hugo@HugoLemons谢谢雨果的帮助
<mx:DataGrid id="myDataGrid" dataProvider="{myDP}">
        <mx:columns>
            <mx:DataGridColumn dataField="field">
                <mx:itemRenderer>
                    <mx:Component>
                        <mx:Button label="{data.field}"/>
                    </mx:Component>
                </mx:itemRenderer>
            </mx:DataGridColumn>
        </mx:columns>
    </mx:DataGrid>
<s:DataGrid dataProvider="{myDP}">
    <s:columns>
        <s:ArrayList>
            <s:GridColumn dataField="Price">
                <s:itemRenderer>
                    <fx:Component>
                        <s:GridItemRenderer>
                            <s:Button label="{data.Price}"/>
                        </s:GridItemRenderer>
                    </fx:Component>
                </s:itemRenderer>    
            </s:GridColumn>
        </s:ArrayList>
    </s:columns>
</s:DataGrid>