2 Replies Latest reply on Jul 22, 2010 6:43 PM by Benoitcn

    How can get the datagridItemRenderer default color

    Benoitcn Level 1
      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?