在 Adobe Flex 中设置数据网格行的背景颜色 [英] Setting background color for datagrid row in Adobe 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://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&productId=2
这篇关于在 Adobe Flex 中设置数据网格行的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!