0 Replies Latest reply on Aug 27, 2007 10:36 PM by ausaran007

    Radiobutton gets selected when editing a datagrid

    ausaran007
      Hi all,
      I have a radiobutton inside a itemrenderer in a datagrid. Whenever I edit an element in a datagrid(modify or delete) the resulting datagrid gets populated with the last elements radiobutton always checked. how to overcome this problem?
      My code looks like this.


      <mx:DataGrid id="creditPolicyGrid" dataProvider="{model.creditPolicyCollection}"
      styleName="dataGridStandard" width="776" height="274">
      <mx:columns>
      <mx:DataGridColumn width="25" headerText="" dataField="typeSelected" editable="true"
      editorDataField="selected" rendererIsEditor="true" sortable="false">
      <mx:itemRenderer>
      <mx:Component>
      <mx:RadioButton click="parentDocument.setSelectedRadio()" paddinggLeft="5" horizontalGap="0" />
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="PositionType" dataField="positionType" labelFunction="getCode" />
      <mx:DataGridColumn headerText="Side" dataField="side"/>
      <mx:DataGridColumn headerText="Price" dataField="priceFrom" labelFunction="{getPriceFrom,checkisPriceBetween}" />
      <mx:DataGridColumn headerText="IME" dataField="ime" labelFunction="checkDollarOrPercentForIME"/>
      <mx:DataGridColumn headerText="IMR" dataField="imr" labelFunction="checkDollarOrPercentForIMR" />
      <mx:DataGridColumn headerText="CMR" dataField="cmr" labelFunction="checkDollarOrPercentForCMR" />
      <mx:DataGridColumn headerText="MMR" dataField="mmr" labelFunction="checkDollarOrPercentForMMR" />
      <mx:DataGridColumn headerText="IMV" dataField="imv" labelFunction="checkDollarOrPercentForIMV"/>
      <mx:DataGridColumn headerText="DTE" dataField="dte" labelFunction="{getDte,checkDollarOrPercentForDTE}"/>
      </mx:columns>
      </mx:DataGrid>