0 Replies Latest reply on Nov 2, 2010 9:58 AM by TheGarfunkal

    Using Style Function in AdvancedDataGrid to mess with Colours

    TheGarfunkal Level 1

      Hi

       

      I am using a styleFunction in an Advanced  Data grid to change the background colours - the function is bellow

       

      I can mess with the test to my hearts content, but i cant chage the row background.  Is this possible?

       

      backgroundcolor is just one of many attempts! Looked everywhere, but aside from using a itemrenderer to override I cant come up with a solution (cant use this due to all kinds of nesting issues)

       

       

      Any ideas?

       

       

       

                public function myStyleFunc(data:Object,

                  col:AdvancedDataGridColumn):Object

                {

                   if (data["RAG"] == "Red")

                      return {color :0xFF0000, backgroundcolor:0xFFF552,fontWeight:'bold',fontStyle:'italic'}; 

                  else if (data["RAG"] == "Amber")

                      return {color :0xf7ba48};

                  else  return {color :0x1bea15};

                }