在 Adob​​e Flex 中设置数据网格行的背景颜色 [英] Setting background color for datagrid row in Adobe Flex

查看:24
本文介绍了在 Adob​​e Flex 中设置数据网格行的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以编程方式更改 Flex 数据网格中单行的背景颜色.我在网上搜索并找到了对dg.setPropertiesAt"的引用,这不是受支持的方法(根据编译器).此外,还有一些建议可以扩展 dg 的drawRowBackground"方法,但我需要在外部设置背景(而不是从 dg 内部的逻辑).

I need to programmatically change the background color for a single row in a datagrid in Flex. I've scoured the Net and found reference to "dg.setPropertiesAt," which is not a supported method (according to the compiler). Also, there are suggestions to extend the dg's "drawRowBackground" method but I need to set the background externally (not from logic inside the dg).

欢迎提出任何建议.

TIA,鲍勃

推荐答案

您必须使用 itemRenderer 才能完成此任务.有关详细信息,请参阅以下示例:

You'll have to use an itemRenderer in order to accomplish this. See the following examples for more information:

http://butterfliesandbugs.wordpress.com/2007/07/11/using-an-itemrenderer-to-change-the-background-of-a-datagrid-cell/

http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&productId=2

这篇关于在 Adob​​e Flex 中设置数据网格行的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆