Flex :在当前排序列的数据网格标题上使用自定义背景皮肤
我使用 Flex mx:datagrid。我可以设置 headerBackgroundSkin 来指定要在所有数据网格列的标题中显示的皮肤或图片,并且效果很好!
问题是我找不到任何方法来为当前排序的列指定自定义外观(排序是 asc 或 desc 并不重要,这只是为了向用户显示当前排序的列)。
我还尝试为每列创建一个自定义 headerRenderer,但它非常复杂并且效果不佳。
我一直在寻找解决方案一段时间,但我找不到一个好的方法来做到这一点。这听起来对我来说是一个非常基本的需求……令人难以置信的是,用 Flex 实现它是如此复杂!
我注意到几年前有人在寻找同样的东西但没有成功...... http://groups.google.com/group/flex_india/msg/78564c365c487583
如果有人有解决方案或解决方法,我将不胜感激!
提前致谢 金
[弹性]
I use a flex mx:datagrid. I can set the headerBackgroundSkin to specify a skin or a picture to be displayed in all datagrid column's headers and it works just fine !
The problem is I can't find any way to specify a custom skin for the currently sorted column (doesn't matter if the sort is asc or desc, this is just to show the user which column is currently sorted).
I also tried to create a custom headerRenderer for each column but it is quite complicated and doesn't work very well.
I have been looking for the solution for a while but I can't find a good approach to do it. It sounds like a very basic need for me...incredible it is so complicated to achieve with Flex !!
I noticed someone was looking for the same thing few years ago but without success...
http://groups.google.com/group/flex_india/msg/78564c365c487583
If anyone has a solution or a workaround I would appreciate a lot !
Thanks in advance
Kim
[Flex]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该列没有“皮肤”,但是,当用户单击对列本身进行排序时,您可以更改列本身的
backgroundColor
样式。如果你想要更复杂的东西,你将不得不扩展数据网格本身来完成它。There is no 'skin' for the column, however, you could change the
backgroundColor
style on the column itself when the user clicks to sort on the column itself. If you want something more complex, you will have to extend the Datagrid itself to do it.如果仅更改背景颜色,则对标题没有影响
If you only change backgroundColor it has no effect on header