Flex - Sending a parameter to a custom ItemRenderer?

后端 未结 10 1362
悲哀的现实
悲哀的现实 2020-12-24 07:37

What I am trying to accomplish to to get financial data in my Flex Datagrid to be color-coded--green if it\'s positive; red if it\'s negative. This would be fairly straight

10条回答
  •  青春惊慌失措
    2020-12-24 07:51

    Ah, so I knew about outerDocument but not parentDocument. I was able to just use parentDocument.*whatever I want from the main App and I can access it as long as it's public.

    Example:

    setStyle("color", (parentDocument.availableFunding >= 0) ? POSITIVE_COLOR : NEGATIVE_COLOR);
    

    Sweet! :)

提交回复
热议问题