Oh. I want to represent one itemrenderer is clicked by changed the backgroundColor and then changed back. So which function in datagrid I should overrided to achieve this functionality? Or is there a better way to do this ? Thanks Alex.
At 2010-07-20 14:17:57,"Alex Harui" <aha...@adobe.com> wrote: Normally the renderer is transparent. The background color is drawn onto the DataGrid’s content holder, not the renderer. On 7/19/10 11:02 PM, "j2me_soul" <j2me_s...@163.com> wrote: I want to change the color when user click the itemrenderer to a custom color and then change it back but I can't get the default color using this.getStyle("backgroundColor") in the addedToStage callback function. the halo skin defaults.css -------------------------------------- DataGrid { alternatingItemColors: #F7F7F7, #FFFFFF; // odd-rows-color, even-rows-color columnDropIndicatorSkin: ClassReference("mx.skins.halo.DataGridColumnDropIndicator"); columnResizeSkin: ClassReference("mx.skins.halo.DataGridColumnResizeSkin"); headerColors: #FFFFFF, #E6E6E6; headerDragProxyStyleName: "headerDragProxyStyle"; headerBackgroundSkin: ClassReference("mx.skins.halo.DataGridHeaderBackgroundSkin"); headerSeparatorSkin: ClassReference("mx.skins.halo.DataGridHeaderSeparator"); headerStyleName: "dataGridStyles"; sortArrowSkin: ClassReference("mx.skins.halo.DataGridSortArrow"); stretchCursor: Embed(source="Assets.swf",symbol="cursorStretch"); verticalGridLineColor: #CCCCCC; } How can get the DataGridItemRenderer default backgroundColor without judging the row is odd or even to evaluate the color with hardcode? 网易邮箱,没有垃圾邮件的邮箱。 <http://mail.163.com/?from=fe1> -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui