jeudi 9 juin 2016

DataGrid itemrenderer getting issue while scroll

I am using radio button inside spark datagrid as following way.

<s:DataGrid dataProvider="{arrList}" >
<s:columns>
<mx:ArrayList>
<mx:source>
    <s:GridColumn width="90" headerText="radio">
     <s:itemRenderer >
     <fx:Component>
        <s:GridItemRenderer>
                <fx:Script>
                <![CDATA[
                    override public function set data( value:Object ) : void 
                    {
                        super.data = value;
                        rdId.group=outerDocument.rbgGroup;
                    }
                ]]>
                </fx:Script>
          <s:RadioButton id="rdId" />
        </s:GridItemRenderer>
        </fx:Component>
        </s:itemRenderer>
    </s:GridColumn>

     <s:GridColumn headerText="Name" dataField="name" />
    </mx:source>
  </mx:ArrayList>
</s:columns>
</s:DataGrid>

I have created group for radiobutton as i want any one of selected.

<s:RadioButtonGroup id="rbgGroup" />

This working fine. But, if i select any radio like first and scroll then it will select another radio button automatically and first selected removed.

I have checked many other post like this but that doesn't seems work.

Issue occurred only when i scroll.
Any help would greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire