1 Reply Latest reply on Apr 25, 2008 2:52 PM by javamonjoe

    DataGrid Styleing

    WebmastaDj
      I need some help with data grid styling. I want to make different colors for the columns. For example:

      W R W R
      W R W R
      W R W R
      W R W R

      Where W = white and R = red color. Is there a way to do this?
        • 1. Re: DataGrid Styleing
          javamonjoe Level 1
          Not a problem. Simply specify the color or backgroundcolor in your DataGridColumn definition as follows:

          <mx:DataGrid>
          <mx:columns>
          <mx:DataGridColumn dataField="name" headerText="Name" backgroundColor="0xff0000"/>
          <mx:DataGridColumn dataField="phone" headerText="Phone" color="0x00ff00"/>
          <mx:DataGridColumn dataField="email" headerText="Email" backgroundColor="0xff0000"/>
          </mx:columns>
          </mx:DataGrid>

          If you are using ActionScript to define your columns you will have to set the style properties programatically.