AdvancedDataGridRendererProvider에서 렌더러 속성에 대한 customItemRender를 할당했습니다.고급 DataGrid 렌더러 요소에 액세스
<mx:HBox width="100%">
<mx:Button id="editBtn"/>
</HBox>
우리가 메인 페이지에 customItemRenderer에서 "editBtn"를 액세스 할 수있는 방법 (DataGrid에가있는)
<mx:AdvancedDataGrid id="productADG" dragEnabled="true" displayItemsExpanded="true"
dropEnabled="true" variableRowHeight="true"
headerHeight="40" minHeight="5000" height="1000"
sortableColumns="false"
sortExpertMode="true" width="100%"
defaultLeafIcon="{null}" folderOpenIcon="{null}"
openDuration="400" headerWordWrap="true" >
<mx:dataProvider>
<mx:HierarchicalData id="hd" source="{productXML.product}" />
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="@productName" headerText="Product"
width="120" wordWrap="true"/>
<mx:AdvancedDataGridColumn dataField="@descriptionTxt" headerText="Description"
width="165" wordWrap="true"/>
<mx:AdvancedDataGridColumn width="145" headerText="Tools" id="toolsCol"
resizable="false"/>
</mx:columns>
<mx:rendererProviders>
<mx:AdvancedDataGridRendererProvider id="compRend" depth="2"
renderer="customItemRender" column="{toolsCol}"/>
</mx:rendererProviders>
</mx:AdvancedDataGrid>
customItemRender.mxml
I :
이
내 코드입니다 메인 페이지에서 수동으로 클릭 이벤트를 보내고 싶습니다 (Datagrid가 상주합니다).
왜 버튼에서 이벤트를 강제로 실행할지 묻는다면 어떨까요? – CyanAngel