在Adobe Flex中为datagrid行设置背景颜色 [英] Setting background color for datagrid row in Adobe Flex

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

问题描述

我需要以编程方式更改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,
Bob

TIA, Bob

推荐答案

您必须使用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

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

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