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

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

问题描述

我需要以编程方式更改单个行的背景色在Flex的DataGrid中。我(根据编译器)走遍了网,发现提及dg.setPropertiesAt,这不是一个支持的方法。另外,还有一些建议延长克的drawRowBackground的方法,但我需要(从逻辑不是分克内部)设置背景外部。

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).

任何和所有的建议表示欢迎。

Any and all suggestions welcome.

TIA,
鲍勃

TIA, Bob

推荐答案

您将不得不使用的itemRenderer一个为了做到这一点。请参阅以下示例以获取更多信息:

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

<一个href=\"http://butterfliesandbugs.word$p$pss.com/2007/07/11/using-an-itemrenderer-to-change-the-background-of-a-datagrid-cell/\">http://butterfliesandbugs.word$p$pss.com/2007/07/11/using-an-itemrenderer-to-change-the-background-of-a-datagrid-cell/

<一个href=\"http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&productId=2\">http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&productId=2

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

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