我使用 . 将一组项目绑定到数据网格ItemRenderer
。我使用data
变量来控制可绑定数据。我也someComponentVariable
需要将其插入每一行,但它是在组件范围内声明的,因此数据网格似乎没有重新调整它(编译错误)。
我怎样才能someComponentVariable
在里面使用这个变量()ItemRenderer
?
代码示例
<mx:DataGrid id="userBonusesGrid" width="100" height="248" showHeaders="false" wordWrap="true">
<mx:columns>
<mx:DataGridColumn headerText="" width="36">
<mx:itemRenderer>
<mx:Component>
<mx:VBox verticalAlign="middle" horizontalAlign="center">
<ns1:SidePanelBonus
bonusName="{data.name}" description="{data.description}"
arrow="{someComponentVariable}">
</ns1:SidePanelBonus>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>