/* data grid */
<mx:AdvancedDataGrid id="grdData" designViewDataType="flat" height="100%" width="100%" enabled="true" dataProvider="{_arrDetailData}" editable="false">
<mx:columns>
<mx:AdvancedDataGridColumn headerText="Color" dataField="colordesc" width="120" editable="false"/>
<mx:AdvancedDataGridColumn width="90" headerText="Received" dataField="qtyapply" textAlign="right" editable="true">
<mx:itemRenderer>
<mx:Component>
<mx:Label text="{parentApplication.formatTextNumberDisplayNo(data.qtyapply,0)}" textAlign="right" click="outerDocument.editCell(4)"/>
</mx:Component>
</mx:itemRenderer>
</mx:AdvancedDataGridColumn>
</mx:columns>
</mx:AdvancedDataGrid>
/* script function */
public function editCell(column:Number):void {
grdData.editedItemPosition = {columnIndex:column, rowIndex:grdData.selectedIndex}
}
I would like to thank the site where I learned this stuff.
RSS Feed 


0 comments:
Post a Comment