Adobe Flex:AdvancedDataGrid 分组列 - 性能
当我创建一个包含 1000 列的网格时,ADG 表现良好。当我创建分组列时,垂直滚动条的性能非常糟糕。
假设我有一个父列,其中有 10 个子列。像这样我总共有 100 个父列。当我在此表上显示 50 行记录时,使用滚动条拖动水平滚动条会花费大量时间。
<fx:Script>
<![CDATA[
private var dp:Array = [
{ symbol: "ADBE", name: "Adobe Systems Inc.", price: 49.95,high: 40, low: 1, av:23, med: 5 }, <br>
{ symbol: "ADBE", name: "Adobe Systems Inc.", price: 49.95,high: 40, low: 1, av:23, med: 5 }, <br>
{ symbol: "ADBE", name: "Adobe Systems Inc.", price: 49.95,high: 40, low: 1, av:23, med: 5 } <br>
];
]]> <br>
</fx:Script>
<mx:AdvancedDataGridColumn headerText="col1" dataField="symbol"/>
<mx:AdvancedDataGridColumn headerText="name" dataField="name"/>
<mx:AdvancedDataGridColumnGroup headerText="price1">
<mx:AdvancedDataGridColumn headerText="price" dataField="price"/>
<mx:AdvancedDataGridColumn headerText="high" dataField="high"/>
<mx:AdvancedDataGridColumn headerText="low" dataField="low"/>
<mx:AdvancedDataGridColumn headerText="av" dataField="av"/>
<mx:AdvancedDataGridColumn headerText="med" dataField="med"/>
</mx:AdvancedDataGridColumnGroup>
When I create a grid with 1000 columns, the ADG performs well. When I create grouping column, the vertical scroll bar performance real bad.
Say, I have one parent column with 10 child columns inside it. Like this I have total 100 parent columns. When I show 50 rows of records on this table, the horizontal scrollbar takes a lot of time when dragged using the bar.
<fx:Script>
<![CDATA[
private var dp:Array = [
{ symbol: "ADBE", name: "Adobe Systems Inc.", price: 49.95,high: 40, low: 1, av:23, med: 5 }, <br>
{ symbol: "ADBE", name: "Adobe Systems Inc.", price: 49.95,high: 40, low: 1, av:23, med: 5 }, <br>
{ symbol: "ADBE", name: "Adobe Systems Inc.", price: 49.95,high: 40, low: 1, av:23, med: 5 } <br>
];
]]> <br>
</fx:Script>
<mx:AdvancedDataGridColumn headerText="col1" dataField="symbol"/>
<mx:AdvancedDataGridColumn headerText="name" dataField="name"/>
<mx:AdvancedDataGridColumnGroup headerText="price1">
<mx:AdvancedDataGridColumn headerText="price" dataField="price"/>
<mx:AdvancedDataGridColumn headerText="high" dataField="high"/>
<mx:AdvancedDataGridColumn headerText="low" dataField="low"/>
<mx:AdvancedDataGridColumn headerText="av" dataField="av"/>
<mx:AdvancedDataGridColumn headerText="med" dataField="med"/>
</mx:AdvancedDataGridColumnGroup>
mx AdvancedDataGrid 当有更多列时会出现性能问题..(滚动性能很差)
有时绘制网格会失败
您可以使用基于 Spark 的灵活网格或创建您自己的自定义 Spark 网格。
mx AdvancedDataGrid has performance issues when it has more columns ..(Scroller performance is bad )
Sometimes it fails on drawing the grid
You can either use spark based flexicious grid or create your own custom spark grid.