2 Replies Latest reply on Dec 1, 2010 2:11 AM by nikos101

    simple label renderer in a datagrid where I can vary the background color

    nikos101 Level 2

      Not sure of the best way to implement this in flex 4. Basically I want a simple label render in a datagrid where I can vary the background color, I could do this in flex 3:

       

      I think I need to create some sort of skin for the label render?

       

      <mx:DataGridColumn  dataField="score1"
                                     headerText="Enthusiasm" wordWrap="true" width="100"  id="score1">
                                     <mx:itemRenderer>
                                    
                                     <mx:Component >
                                         <mx:TextInput height="100%" borderStyle="none"  editable="false"
                                             backgroundColor="{outerDocument.rendererBG(data.score1)}"/>
                                     </mx:Component>
                                    
                                 </mx:itemRenderer>
                             </mx:DataGridColumn>

       

      thanks friends