如何删除 AdvancedDataGrid 上的突出显示/选择
这page 描述了如何重写 DataGrid 标头的 drawHighlightIndicator/drawSelectionIndicators 方法,但 AdvancedDataGrid 在 mx_internal 中没有“headerClass”。相反,它有一个 headerRenderer。
如何在 Flex 3 中的 AdvancedDataGrid 上删除那些被破坏的突出显示?
This page describes how to override the drawHighlightIndicator/drawSelectionIndicators methods for the header of a DataGrid, but an AdvancedDataGrid does not have "headerClass" in mx_internal. It instead has an headerRenderer.
How can I remove those blasted highlights over an AdvancedDataGrid in Flex 3?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很抱歉发布不同的答案,但我没有足够的“点”对此做出直接评论。今天我遇到了完全相同的问题,发现这篇文章非常有帮助。
如果我错了,请纠正我,但我认为 mouseDownHandler 中缺少一行,这会阻止 AdvancedDataGrid 正确对数据进行排序(如果启用了数据排序):
尽管它可能很有用。
Sorry to post a different answer but I don't have enough 'points' to make a direct comment on this. Today I had run into exact same issue and found this post very helpful.
Correct me if I'm wrong but I think one line is missing in the mouseDownHandler which prevents AdvancedDataGrid from properly sorting the data (if data sorting is enabled):
Though it may be useful.
AdvancedDataGridBaseEx.as 中第 5468-5471 行中绘制的图形调用:
要摆脱此问题,您可以在扩展 AdvancedDataGrid 的类中执行此操作:
尽管这是一个极其不优雅的解决方案,因为它所做的一切都清楚已经是什么绘制的。因为 AdvancedDataGridBaseEx 中的鼠标处理程序中有很多其他废话,所以您将无法轻松自定义标头的外观。
一个稍微优雅的(黑客)解决方案是将 AdvancedDataGridBaseEx 的完整源代码复制到 mx.controls 包中(我相信你们中的许多人都知道这种黑客,并且同样意识到其后果)。
The graphics calls that draw that are in AdvancedDataGridBaseEx.as from lines 5468-5471:
To get rid of this you can do this in an class that extends AdvancedDataGrid:
Although that is an extremely inelegant solution since all it does is clear what has already been drawn. Because there's so much other crap in the mouse handlers in AdvancedDataGridBaseEx you won't easily be able to customize the appearance of the header.
A slightly more elegant (hack) solution is to copy the full source of AdvancedDataGridBaseEx into the mx.controls package (a hack I'm sure many of you are aware of and equally aware of the consequences).