2010-09-24 24 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> 

et les fournisseurs ont changé comme celui-ciMélanger 2 datagrids en un seul avec les États

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; 
} 

Je reçois une erreur:

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

Répondre

1

On dirait que vous avez utilisé un ViewStack ou TabNavigator.

Dans ce cas, vous devez faire une des opérations suivantes: (.-À-dire, envelopper votre dataGrid dans une toile)

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

ou

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

(ie. , envelopper votre DataGrid dans un groupe, et le groupe à l'intérieur d'un tag NavigatorContent.)

Remarque - l'approche est la même avec un onglet de navigation.