Flex datagrid doubleclick事件

protected function risk_doubleCclickHandler(event:MouseEvent=null):void
{
				
	var panel:RiskEditPanel=new RiskEditPanel();
	//选中的数据
	panel.risk=riskDG.selectedItem as RiskVo;

	panel.stateValue="edit";
	PopUpManager.addPopUp(panel,FlexGlobals.topLevelApplication as DisplayObject,true);
}

 

<mx:AdvancedDataGrid id="riskDG" 
            sortExpertMode="true" height="100%"
            dataProvider="{_riskModel.dataList}"
            width="100%"
            doubleClickEnabled="true"
            doubleClick="risk_doubleCclickHandler(event)">
	<mx:columns>
		<mx:AdvancedDataGridColumn headerText="Risk" dataField="title"/>
		<mx:AdvancedDataGridColumn headerText="Impact" dataField="impact" labelFunction="getImpactLabelFun"/>
                	<mx:AdvancedDataGridColumn headerText="" itemRenderer="com.components.EditRiskRender"/>
	</mx:columns>
</mx:AdvancedDataGrid>

 

你可能感兴趣的:(datagrid)