将 2 个数据网格合并为一个带有状态的数据网格
<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>
并像这样更改了提供商,
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;
}
我收到错误:
Halo 导航器的子级必须实现 INavigatorContent。 ReceiveIn.mxml /work/src/ui/fragments 第 332 行 Flex 问题
<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>
and changed providers like this
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;
}
I get an error:
The children of Halo navigators must implement INavigatorContent. ReceiveIn.mxml /work/src/ui/fragments line 332 Flex Problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您已经使用了 viewstack 或 tabNavigator。
在这种情况下,您需要执行以下操作之一:(
即,将您的 dataGrid 包装在 Canvas 中)
或
(即,将您的 DataGrid 包装在一个组中,并将该组包装在 NavigatorContent 标记中。)
注意 - 方法是与选项卡导航器相同。
Sounds like you've used a viewstack or tabNavigator.
In that case, you need to do one of the following:
(ie., wrap your dataGrid inside a Canvas)
or
(ie., wrap your DataGrid in a group, and the group inside a NavigatorContent tag.)
Note - the approach is the same with a tab navigator.