找不到我的错误:高级数据网格中的分组平面数据不起作用

发布于 2024-09-02 04:51:15 字数 2517 浏览 7 评论 0原文

我有一个 ArrayCollection,它可以正确显示在此高级数据网格中:

 <mx:AdvancedDataGrid id="drawingDataDG"
 editable="true" sortableColumns="true"
 headerWordWrap="true"
 sortExpertMode="true"
 rowCount="8" y="10" right="10" left="10"
  dataProvider="{model.drawingsData}">   
    <mx:columns>
         <mx:AdvancedDataGridColumn 
      headerText="Approved in Week" 
      dataField="ApprovedInWeek" 
      editable="false"
      visible="true"  />
     <mx:AdvancedDataGridColumn 
      headerText="DRAWING_PK" 
      dataField="DRAWING_PK" 
      editable="false"
      visible="false"  />
     <mx:AdvancedDataGridColumn 
      headerText="Drawing No" 
      dataField="DRAWING_NO" 
      editable="false"
      visible="true"/>
     <mx:AdvancedDataGridColumn 
      headerText="Drawing Index" 
      dataField="DRAWING_INDEX" 
      editable="false"
      visible="true"/>
   </mx:columns>

`

根据此解释 链接文本 我已经实现了一个 GroupingCollection。但这就是行不通!

<mx:AdvancedDataGrid id="drawingDataDG"
     editable="true" sortableColumns="true"
     headerWordWrap="true"
     sortExpertMode="true"
     rowCount="8" y="10" right="10" left="10"
            initialize="gc.refresh();">        
        <mx:dataProvider>
            <mx:GroupingCollection id="gc" source="{model.drawingsData}">
                    <mx:Grouping>
                        <mx:GroupingField name="ApprovedInWeek"/>
                    </mx:Grouping>
            </mx:GroupingCollection>
        </mx:dataProvider>  
        <mx:columns>
             <mx:AdvancedDataGridColumn 
          headerText="Approved in Week" 
          dataField="ApprovedInWeek" 
          editable="false"
          visible="true"  />
         <mx:AdvancedDataGridColumn 
          headerText="DRAWING_PK" 
          dataField="DRAWING_PK" 
          editable="false"
          visible="false"  />
         <mx:AdvancedDataGridColumn 
          headerText="Drawing No" 
          dataField="DRAWING_NO" 
          editable="false"
          visible="true"/>
         <mx:AdvancedDataGridColumn 
          headerText="Drawing Index" 
          dataField="DRAWING_INDEX" 
          editable="false"
          visible="true"/>
        </mx:columns>
 </mx:AdvancedDataGrid>

请告诉我您可能需要哪些其他详细信息?

I've got an ArrayCollection which is properly displayed in this Advanced Datagrid:

 <mx:AdvancedDataGrid id="drawingDataDG"
 editable="true" sortableColumns="true"
 headerWordWrap="true"
 sortExpertMode="true"
 rowCount="8" y="10" right="10" left="10"
  dataProvider="{model.drawingsData}">   
    <mx:columns>
         <mx:AdvancedDataGridColumn 
      headerText="Approved in Week" 
      dataField="ApprovedInWeek" 
      editable="false"
      visible="true"  />
     <mx:AdvancedDataGridColumn 
      headerText="DRAWING_PK" 
      dataField="DRAWING_PK" 
      editable="false"
      visible="false"  />
     <mx:AdvancedDataGridColumn 
      headerText="Drawing No" 
      dataField="DRAWING_NO" 
      editable="false"
      visible="true"/>
     <mx:AdvancedDataGridColumn 
      headerText="Drawing Index" 
      dataField="DRAWING_INDEX" 
      editable="false"
      visible="true"/>
   </mx:columns>

`

According to this explanation link text I've implemented a GroupingCollection. But it just doesn't work!

<mx:AdvancedDataGrid id="drawingDataDG"
     editable="true" sortableColumns="true"
     headerWordWrap="true"
     sortExpertMode="true"
     rowCount="8" y="10" right="10" left="10"
            initialize="gc.refresh();">        
        <mx:dataProvider>
            <mx:GroupingCollection id="gc" source="{model.drawingsData}">
                    <mx:Grouping>
                        <mx:GroupingField name="ApprovedInWeek"/>
                    </mx:Grouping>
            </mx:GroupingCollection>
        </mx:dataProvider>  
        <mx:columns>
             <mx:AdvancedDataGridColumn 
          headerText="Approved in Week" 
          dataField="ApprovedInWeek" 
          editable="false"
          visible="true"  />
         <mx:AdvancedDataGridColumn 
          headerText="DRAWING_PK" 
          dataField="DRAWING_PK" 
          editable="false"
          visible="false"  />
         <mx:AdvancedDataGridColumn 
          headerText="Drawing No" 
          dataField="DRAWING_NO" 
          editable="false"
          visible="true"/>
         <mx:AdvancedDataGridColumn 
          headerText="Drawing Index" 
          dataField="DRAWING_INDEX" 
          editable="false"
          visible="true"/>
        </mx:columns>
 </mx:AdvancedDataGrid>

Please let me know what additional details you may need?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷离° 2024-09-09 04:51:15

您必须向 AdvancedDataGrid 传递 HierarchicalData 类作为其 dataProvider 以便它识别您的 GroupingCollections

You have to pass the AdvancedDataGrid an instance of the HierarchicalData class as its dataProvider in order for it to recognize your GroupingCollections

夏有森光若流苏 2024-09-09 04:51:15

最后我能够根据此博客实现分组: 使用 Flex 3 AdvancedDataGrid 汇总分组数据 感谢 Robusto 的指导!

Finally I was able to implement grouping according to this blog: Summarizing Grouped Data With Flex 3 AdvancedDataGrid Thanks Robusto for guiding!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文