1 Reply Latest reply on Aug 18, 2011 9:30 AM by Shongrunden

    Playing with the spark datagrid

    nikos101 Level 2

      I'm Playing with the spark datagrid and have a column set up like so:


      <GridColumn  width="140" headerText="Margin" headerText.editMode="Margin (editing)" dataField="margin" editable="false"  editable.editMode="true" itemRenderer="gridColumnRenderer" >


      I would like the item render to change colour based on the state of the outerDocuent, is this possible?


      I tried this but can't get to the outerdocument


      <?xml version="1.0" encoding="utf-8"?>
      <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
          <s:Label text="{data.margin}" backgroundColor="{   outerDocument.currentState =='editMode'?0xffffff:0xdddddd}"/>