我需要单选按钮作为 mx 数据网格中的 itemRenderer 的帮助。我想成为在给定时间仅选择 1 个单选按钮的表格,但我的数据网格允许选择超过 1 个单选按钮。我不想要这种行为。
I have also included a groupName to the radioButtons in the itemRenderer but still it doe4s not work.
Please have a look at my codes below and help me with this.
<mx:DataGrid id="myGrid" showHeaders="false" headerHeight="0"
fontSize="9" x="20" y="20" width="217" height="30">
<mx:columns>
<mx:DataGridColumn width="20" headerText="isDefault" dataField="@IS_DEFAULT">
<mx:itemRenderer>
<fx:Component>
<mx:HBox horizontalAlign="left">
<s:RadioButton selected="@{data.isDefault}" group="{outerDocument.rbg1}" horizontalCenter="0"/>
</mx:HBox>
</fx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>