3 Replies Latest reply on Mar 17, 2013 11:26 AM by DeanLoganBH

    use condition in flex

    OULD FELLA

      hi,

      I need to use itemrender or something like this to display a value of GridColumn in a different color accordin his value

      <s:GridColumn width="120" dataField="email_active" headerText="E-mail active">

                                  <s:itemRenderer>

                                      <fx:Component>

                                          <s:GridItemRenderer>

                                              <s:Label  backgroundColor="{ data.email_active == 1 ? '#00ff00' : '#FF0000'}" />

                                          </s:GridItemRenderer>

                                      </fx:Component>

                                  </s:itemRenderer>  

                              </s:GridColumn>

      email_active : is a data field from a table of my data base,

      the data base is uploaded in datagrid using a php and this code :

      <s:AsyncListView id="UserAsyn" list="{getUserResult.lastResult}"/>