How do you merge cells in a Flex Datagrid?

本秂侑毒 提交于 2019-12-20 01:36:24

问题


Is there any way to merge cells (vertically and/or horizontally) in a datagrid? At least, for example, is there a way to show that certain datagridcolumns belong to one group.

For example, I'll take three columns: column1, column2, column3. All these three should be grouped to the Category cell with a rowspan of 3 -- a "super header" if you will.

Thanks, let me know.


回答1:


This should create a Split Header according to Alex Harui:

http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html

http://blogs.adobe.com/aharui/SplitColumns/dg.swf

Similarly, instead of trying to merge two cells horizontally: try splitting one cell into two cells using and itemRenderer for the dataGridColumn.




回答2:


AFAIK, no. Let someone correct me, but I've gone through the trouble to write my own table control to get around this. The Grid has the span concept though.

That is, I mean horizontal grouping. The AdvancedDataGrid supports row-grouping, but I've never used it so I can't go into specific examples.




回答3:


I have found that a free MecGrid component solves this merging cells problem (it includes other cool features). But this custom component also misses a lot of other features found in standard FlexComponents.

http://code.google.com/p/flexspreadsheet/



来源:https://stackoverflow.com/questions/1569311/how-do-you-merge-cells-in-a-flex-datagrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!