2010-09-24 65 views
0
<mx:DataGrid id="grid" width="100%" height="100%" sortableColumns="true" 
      itemClick.ordersState="{_selectedOrder=grid.selectedItem.ordersState}" 
      selectable.ordersState="true" includeIn="locationsState, ordersState" > 
    <mx:columns > 
     <mx:DataGridColumn dataField="name" headerText="Name" includeIn="locationsState"/> ->ex Location grid 
     <mx:DataGridColumn dataField="locationTypeName" headerText="Type" includeIn="locationsState" /> ->ex Location grid 
     <mx:DataGridColumn dataField="uid" headerText="Number" includeIn="ordersState" /> ->ex Orders grid 
     <mx:DataGridColumn headerText="Order #" dataField="orderId" includeIn="ordersState"/> ->ex Orders grid 
     <mx:DataGridColumn headerText="Status" dataField="orderStatus" includeIn="ordersState"/> ->ex Orders grid 
     <mx:DataGridColumn dataField="customerName" headerText="Customer" includeIn="ordersState" /> ->ex Orders grid 
    </mx:columns> 
</mx:DataGrid> 

,改變供應商這樣合併2個DataGrid中爲一家擁有國家

private function _ws_result_order(e:ResultEvent):void 
{ 
    grid.dataProvider.ordersState = e.result; 
} 

private function _ws_result(e:ResultEvent):void 
{ 
    grid.dataProvider.locationsState = e.result; 
} 

我得到一個錯誤:

The children of Halo navigators must implement INavigatorContent. ReceiveIn.mxml /work/src/ui/fragments line 332 Flex Problem

回答

1

聽起來像是你已經使用了viewstack或TabNavigator的。

在這種情況下,你需要做以下之一:(即緊裹Canvas中你的數據網格)

<ViewStack> 
    <Canvas> 
     <DataGrid /> 
    </Canvas> 
</Viewtack> 

<Viewstack> 
    <NavigatorContent> 
      <Group> 
       <DataGrid /> 
      </Group> 
     </NavigatorContent> 
</Viewstack> 

(即。 ,將您的DataGrid包裝在一個組中,並將該組包含在NavigatorContent標記內。)

注 - 方法是與選項卡導航器相同。

相關問題