Ever tried to remove the gradient from the DataGrid Component in Flash MX 2004? I know I sure did! Supposedly you can just change some movie clip in the standardTheme.fla and add it to your movie or something but after following all of the tutorials out there (none of which talked about DataGrid), nothing was working for me. I even tried going through the forums and saw that others were looking for a solution, but to no avail.
Well, after a few days of searching and trail and error processes, I finally came up with an answer!
Instead of dragging the data grid from the components window, open the standardTheme.fla and add it from there. If you just drag the dataGrid component, it will add everything else you need automatically. Remember: this hack won’t work if you just add the compiled clip from the components window. Now you just have to mess with the dataGrid.as found in the following directory:
windows
C:Documents and Settings<username>Local SettingsApplication DataMacromediaFlash MX 2004enConfigurationClassesmxcontrolsdataGrid.as
OS X
Hard Drive/Users/<username>/Library/Application Support/Macromedia/Flash MX 2004/en/Configuration/Classes/mx/controls/dataGrid.as
Once you are in that file, look for a function called drawHeaderBG() and change the following:
from:
var colors : Array = [clr, clr, 0xffffff];
to:
var colors : Array = [clr, clr, clr];
Now you can set the color using mygrid.setStyle(“headerColor”, <yourcolor>); and it will be a solid color!