Flex 高级数据网格自动换行
我有一个 AdvancedDataGrid 组件,其中包含使用 MXAdvancedDataGridItemRenderer 呈现的 AdvancedDataGridColumn。当用户拉伸任何列时,我希望所有行调整其高度。因此,我将variableRowHeight 设置为true,并将wordWrap 设置为true。
问题是它并不总是重新调整其高度。拉伸一列将导致它溢出到另一行。现在,如果我只需单击列分隔符,它将重新调整。所以基本上,首先拉伸它,然后单击列分隔符就可以解决溢出问题。
有人遇到过这个溢出问题吗?
更新
第 1 步(初始):
第 2 步(首次调整大小后):
步骤 3(单击列分隔符后):
ItemRenderer:
<fx:Component className="nameRenderer">
<s:MXAdvancedDataGridItemRenderer width="100%">
<s:layout>
<s:HorizontalLayout />
</s:layout>
<mx:Image source="application/documentManager/mimeTypeIcons/{data.img}" toolTip="{data.tooltip}"
horizontalCenter="0" verticalCenter="0" />
<mx:Text top="5" left="5" right="5" bottom="5" text="{data.data.name}" toolTip="{data.tooltip}" width="100%" />
</s:MXAdvancedDataGridItemRenderer>
</fx:Component>
I have an AdvancedDataGrid component, which has AdvancedDataGridColumn's that are rendered using MXAdvancedDataGridItemRenderer. When user stretches any columns, I want all rows to adjust it's height. So, I set variableRowHeight to true and wordWrap to true.
The problem is that it doesn't always readjust its height. Stretching a column will cause it to overflows into another row. Now, if i just click on the column separator, it will readjust. So basically, first stretching it and then just clicking on column separator solves the overflow problem.
Anyone encounter this overflow issue before?
Update
Step1 (Initial):
Step2 (After first re-size):
Step3 (After clicking on column separator):
ItemRenderer:
<fx:Component className="nameRenderer">
<s:MXAdvancedDataGridItemRenderer width="100%">
<s:layout>
<s:HorizontalLayout />
</s:layout>
<mx:Image source="application/documentManager/mimeTypeIcons/{data.img}" toolTip="{data.tooltip}"
horizontalCenter="0" verticalCenter="0" />
<mx:Text top="5" left="5" right="5" bottom="5" text="{data.data.name}" toolTip="{data.tooltip}" width="100%" />
</s:MXAdvancedDataGridItemRenderer>
</fx:Component>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我的上一个项目中,我对 adg 做了很多工作。
但我从来没有遇到过这个问题。你能给我一个截图吗?
我在滚动条方面遇到了一些问题。使用 Hero-SDK 安装 FlashBuilder Burrito 后,这个问题就消失了。
他们用 adg 做了一些事情,dg 现在也可以作为 Spark 使用。
也许这会解决您的问题?
BR
坦率
in my last project, i did a lot with the adg.
But i never had this issue. Can you give me a Screenshot?
I had some probems with the scrollbars. After installing FlashBuilder Burrito with the hero-SDK, this issue gone away.
They did a few things with adg and the dg is now also available as a spark.
Probably this will solve your issue?
BR
Frank