删除 Flex DataGrid 中的空白行 (Flex 3)
我遇到了类似于 如何使数据网格高度等于 Adobe Flex 中的数据内容,但是建议的答案对我不起作用。
DataGrid 末尾的空白行一开始不显示,直到我开始编辑最后一行,此时整个网格立即向上推,使顶行消失,空白底行重新出现。
Nikhil在那篇文章中的回答说,设置高度来计算包括标题在内的整体高度以及将verticalScrollPolicy设置为关闭仍然对我没有帮助。
I am encountering a problem similar to How can I make datagrid height is equal to data content in Adobe Flex however suggested answers did not work for me.
The blank row at the end of the DataGrid does not display at first, until I begin editing editing the last row, at which the entire grid is immediately pushed upwards, making the top row disappear and the blank bottom row reappear.
Nikhil's answer in that post said that setting the height to count the overall height including the header as well as setting the verticalScrollPolicy to off still did not help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
巴茨在那篇文章中的回答通常对我有用: 如何使datagrid高度等于Adobe Flex中的数据内容
然后设置
Barts answer from that post usually does it for me: How can I make datagrid height is equal to data content in Adobe Flex
And then setting
将 headerHeight 添加到网格中,使其为我解决完全相同的问题。我没有看到任何相关性,但这就是 Flex 的滚动方式。
Added headerHeight to the grid to get it working for me for exactly the same problem. I don't see any correlation but that's how flex rolls.
尝试以下代码。这对我有用!
这里“18”是我的行高。由于我不想将
verticalScrollPolicy
设置为关闭,因此我在数据网格高度上额外添加了 5(以避免出现滚动条)。假设orgData
是数据提供者。Try the following code. It works for me!
Here '18' is my rowheight. As I don't want to set
verticalScrollPolicy
to off, I added an extra 5 to the datagrid height (to avoid the scrollbar).AssumeorgData
is the data provider.