Flex :在当前排序列的数据网格标题上使用自定义背景皮肤

发布于 2024-11-03 04:02:00 字数 551 浏览 1 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

电影里的梦 2024-11-10 04:02:00

该列没有“皮肤”,但是,当用户单击对列本身进行排序时,您可以更改列本身的 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.

心奴独伤 2024-11-10 04:02:00

如果仅更改背景颜色,则对标题没有影响

If you only change backgroundColor it has no effect on header

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文