0 Replies Latest reply on Feb 5, 2014 11:13 PM by PoornimaBS

    Setting HorizontalGridLineColor from style function

    PoornimaBS

      Hi,

       

      If i am setting horizontalGridLineColor from style function of advanced datagrid based on data it does not work.

       

      Please suggest me a work around, any suggestion will be helpful

       

      Below is the code snippet,

       

      private function updateDataStyle(data:Object,col:AdvancedDataGridColumn):Object {

          if(data) {

           for( var propertyName : * in data){

            if(propertyName == "label")

            {

             if (data[propertyName] == "one") {

              return {horizontalGridLineColor:"0xDDAAFF"};

             }

            }

           }

          }  

          return {horizontalGridLineColor:"0xDDAAFF"};

         }

       

       

       

       

       

       

       

       

       

       

       

       

       

      <mx:AdvancedDataGrid

       

      id="check" dataProvider="{dp}" horizontalGridLines="true" styleFunction="updateDataStyle"

      >

       

      <mx:columns>

       

      <mx:AdvancedDataGridColumn dataField="label"

      />

       

      <mx:AdvancedDataGridColumn dataField="value"

      />

       

      </mx:columns>

       

      </mx:AdvancedDataGrid>