Setting background color for datagrid row in Adobe Flex

前端 未结 5 906
孤独总比滥情好
孤独总比滥情好 2020-12-04 02:22

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

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 02:51

    I was wondering the same thing just a couple of days ago. If you have the Pro version of Flex, its AdvancedDataGrid has the built-in "styleFunction" property to handle this. If you've only got the regular DataGrid handy, this might help:

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

    A comment there links to documentation of styleFunction:

    http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridClasses/AdvancedDataGridBase.html#styleFunction

    Beyond that, Stiggler's suggestion for using an itemRenderer is your other recourse.

提交回复
热议问题